在Win11搜索框,PowerShell 输入 systeminfo 命令
能够看到出现了很多处理器的信息,最末尾有个 Hyper-V 要求,如果四个全为 “是”,则表示支持 Hyper-V 功能
桌面新建一个记事本文件,将它的后缀改成cmd或bat,复制下面的代码
Plain Text
复制代码
9
1
2
3
4
5
6
7
8
9
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
