win 10 家庭版 2021年 Hyper-V 的脚本 | 一见知得 | Mr J Blog

win 10 家庭版 2021年 Hyper-V 的脚本

Mr J 11333 0
 pushd "%~dp0"
 dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt
 for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
 del hv.txt
 Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
 pause

保存为bat文件,又键管理员权限运行即可。

发表评论
表情 图片 链接 代码

分享
微信
微博
QQ