Create hyper-v.bat

This commit is contained in:
Anthony Wang 2020-06-29 08:52:55 -05:00 committed by GitHub
parent 048777a8bc
commit ebaece58f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
hyper-v.bat Normal file
View file

@ -0,0 +1,6 @@
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