1.首先新建一个记事本文件。

2.在记事本中写入。

 

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

 

3.将记事本文件保存为bat格式,例如:Hyper-V.bat。

 

 4.以管理员身份执行 Hyper-V.bat 文件。

此时小伙伴们就可以在 "启动或关闭 Windows 功能" 中看到 Hyper-V 啦~

 

 

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐