Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Created January 13, 2022 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trass3r/16d1d78f2c7501cf03f05b3f2e8cf60d to your computer and use it in GitHub Desktop.
Save Trass3r/16d1d78f2c7501cf03f05b3f2e8cf60d to your computer and use it in GitHub Desktop.
Install Windows Sandbox, Hyper-V, Local Group Policy Editor
REM run in admin console
cd %TEMP%
dir /b %SystemRoot%\servicing\Packages\*Containers*.mum >List.txt
for /f %i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%i"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%i"
@REM TODO: this pulls in too many packages
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >List.txt
for /f %i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%i"
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
Dism /online /enable-feature /featurename:Containers-DisposableClientVM /LimitAccess /ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment