1新建txt文档,输入以下内容:
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
2将txt文档后缀改为.bat批处理文件:
hyperv.bat
3右键-》以管理员身份运行该批处理文件
本文介绍了一个简单的批处理脚本,用于自动安装并启用Windows系统的Hyper-V功能。通过创建包含特定命令的bat文件,并以管理员权限运行它,可以实现Hyper-V功能的快速启用。
3323

被折叠的 条评论
为什么被折叠?



