今天win11家庭版安装虚拟机,结果企业版的很容易,家庭版自习执行文件。还是一个死循环,Hyper-V.cmd,这文件要用管理员命令执行。反正弄好了,一会试一下。window自带的虚拟机。pushd "%~dp0"dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txtfor /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"del hyper-v.txtDism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL