Windows11上面Hyper-V安装

发布于 2024-02-22  102 次阅读


创建hyper-v.txt文件,然后重命名为hyper-v.bat文件,再以管理员的方式运行。

hyper-v.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

运行过后重启一下就好了


The world's full of lonely people afraid to make the first move.