Bat系列---【windows11家庭版如何安装hyper-v虚拟机?】

1.在桌面上新建hyper.txt文件,把下面的内容粘进去

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt

for /f %%i in ('findstr /i . hv.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

2.保存,并把文件名后缀txt改成bat。

3.右键,用管理员身份运行,等待程序安装完(时间有点长)

 

 4.重启电脑。

posted on 2022-04-30 21:51  少年攻城狮  阅读(596)  评论(0)    收藏  举报

导航