Skip to content

Instantly share code, notes, and snippets.

@patsevanton
Created February 28, 2022 06:09
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 patsevanton/7b27203b36e4bc321167a58ec145c12f to your computer and use it in GitHub Desktop.
Save patsevanton/7b27203b36e4bc321167a58ec145c12f to your computer and use it in GitHub Desktop.
Windows Sandbox config that installs Chocolatey (dotnet) and mounts Public Documents to Desktop
<Configuration>
<VGpu>Enable</VGpu>
<Networking>Enable</Networking>
<ClipboardRedirection>Enable</ClipboardRedirection>
<ProtectedClient>Enable</ProtectedClient>
<PrinterRedirection>Enable</PrinterRedirection>
<MemoryInMB>0</MemoryInMB>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Users\Public\Documents\</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -Command "start powershell { -NoExit -Command \"&amp; { Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); Import-Module "$env:ProgramData\chocolatey\helpers\chocolateyInstaller.psm1"; Update-SessionEnvironment; cd C:\Users\WDAGUtilityAccount; choco install dotnet-6.0-sdk -y; choco install dotnet-5.0-sdk -y; choco install git -y; }\" }"</Command>
</LogonCommand>
</Configuration>
</LogonCommand>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment