Windows 11启动或关闭Windows功能中没有hyper-v文件解决方法
解决方案:
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
新建文本文档,复制这串代码到文本文档中,修改后缀名为cmd,以管理员权限运行。等待下载结束后,对话框最后一行会让你选择是否重启,在对话框中按‘Y’就好了。重启完成之后进入启动或关闭Windows功能中发现有Hpyer-v这个选项了。