windows10安装HyperV和Containers

  sre

DzjZdI.jpg
InstallHyperV.bat

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
   pause

InstallContainers.bat

pushd "%~dp0"
   dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
   for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
   del containers.txt
   dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
   pause

在管理员权限下运行
重启安装

LEAVE A COMMENT

Captcha Code