windows11家版没有hyper-v,只有专业版才有,需要手动开启。
开启方式如下:
新建hyper.cmd文件,写入下面的内容:
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
右键菜单中以管理员身份运行hyper.cmd
然后弹出一个 用户帐户控制 - Windows命令处理程序 对话框,我们点击:是
然后系统自动进行Windows命令处理,我们等待处理完成以后,在最末处输入:Y,电脑自动重启,进行配置更新,重启后可以在“打开或关闭windows功能”里看到已经Hyper-V已经安装并打上勾了,重启即可使用。