win10 自带虚拟机 没有Hyper-V

桌面新建 自定义名字.bat文件

黏贴如下

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

 保存,以管理员运行。重启之后查看

 

posted @ 2021-11-22 11:37  php的自我修养  阅读(89)  评论(0编辑  收藏  举报