1、使用文本编辑器新建一个Hyper-V.cmd文件,内容如下:
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
2、右键选中Hyper-V.cmd文件,选中点击“以管理员身份运行”
运行后等待下载完成,然后在最后输入 Y 确认即可,随后电脑进入重启。
完成。