1.首先新建一个记事本文件。
2.在记事本中写入。
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
3.将记事本文件保存为bat格式,例如:Hyper-V.bat。
4.以管理员身份执行 Hyper-V.bat 文件。
此时小伙伴们就可以在 "启动或关闭 Windows 功能" 中看到 Hyper-V 啦~