Skip to content

Instantly share code, notes, and snippets.

@t1m0thyj
Last active January 8, 2024 20:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save t1m0thyj/0203094df5cdfa6baee52e2daa9b6cae to your computer and use it in GitHub Desktop.
Save t1m0thyj/0203094df5cdfa6baee52e2daa9b6cae to your computer and use it in GitHub Desktop.
Windows Sandbox config that installs Chocolatey and mounts Public Documents to Desktop
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Users\Public\Documents\</HostFolder>
<ReadOnly>false</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 }\" }"</Command>
</LogonCommand>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment