How to install windows Sandbox with PowerShell

Windows Sandbox provides a lightweight desktop environment to safely run applications in isolation. Software installed inside the Windows Sandbox environment remains "sandboxed" and runs separately from the host machine.

A sandbox is temporary. When it's closed, all the software and files and the state are deleted. You get a brand-new instance of the sandbox every time you open the application. Note, however, that as of Windows 11 Build 22509, your data will persist through a restart initiated from inside the virtualized environment useful for installing applications that require the OS to reboot.

Software and applications installed on the host aren't directly available in the sandbox. If you need specific applications available inside the Windows Sandbox environment, they must be explicitly installed within the environment.

Sources : https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview

Script presentation

Script Source : Github 

My script is divided into two parts :
  • Prerequisites check, this step verifies that the computer has everything needed to install and run Windows Sandbox
    • If you used a virtual machine, the script send alert for activate nested virtualization

More information : https://www.ccmtune.fr/2022/09/hyper-v-nested-virtualization.html
  • Install Windows Sandbox, this step install Windows Sandbox on your computer
    • This step require a restart computer after feature installation

After computer restart, go to Start Menu and click Windows Sandbox icon for launched your sandbox 





Comments

Popular posts from this blog

Windows 11 security check with Powershell

SCCM - Erreur 0x87D00664 lors de l'installation de la mise à jour de Juin 2020

Send email alert if Reboot or shutdown a Server with Powershell