Skip to content

Instantly share code, notes, and snippets.

@patsevanton
Forked from t1m0thyj/choco.wsb
Created February 28, 2022 05:15
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/e69ba82b8df218a89ba546c85ef4aabb to your computer and use it in GitHub Desktop.
Save patsevanton/e69ba82b8df218a89ba546c85ef4aabb 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