
close
close
Chance to win $250 in Petri 2023 Audience Survey
If you want to spin up an isolated Windows 10 desktop quickly, without the knowledge required to work with virtual machines (VM) or the cloud, then Windows Sandbox is the answer.
Windows Sandbox is a feature in Windows 10 Pro, Enterprise, and Education SKUs, which provides users an easy way to quickly test apps in isolation. It uses a clean operating system image that is generated from your system’s current state, so there’s no need to download and install Windows.
When you start Windows Sandbox, there’s a short delay while the image is provisioned in a VM. Because the VM is generated from your current Windows system, it is always up to date with the same version of Windows and patches as the host device.
When the VM is ready, you can install apps and change the OS configuration inside the VM. When Windows Sandbox is restarted, the image is regenerated, wiping any changes you made in the previous session.
Table of Contents
Before you can install Windows Sandbox, you should make sure that your device meets the following prerequisites:
You can check whether virtualization is enabled for your CPU using Task Manager.
If you want to try out Windows Sandbox in a Hyper-V VM, make sure that nested virtualization is enabled for the VM.
Set-VMProcessor -VMName 'Windows 10' -ExposeVirtualizationExtensions $true
Get-VMProcessor -VMName 'Windows 10' | Select-Object ExposeVirtualizationExtensions
Once you are sure that you can run Windows Sandbox, the easiest way to get it installed is using PowerShell.
Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online
Once the Windows Sandbox VM has started, you can use it like you would use the host device. There are a couple of caveats, however.
You can use configuration files to customize a limited set of Windows Sandbox options. Here is a list of the options that can be configured:
Windows Sandbox configuration files are associated with the .wsb file extension. Any time you double click a file with the .wsb extension, Windows Sandbox will be started using the settings in the file.
Windows Sandbox configuration files follow a simple XML format. You can find full documentation on Microsoft’s website here. The following example maps a folder in the VM to a location on the host device. It then runs a script (VSCodeInstall.cmd) from the host, which installs Visual Studio Code in the Windows Sandbox VM.
<Configuration> <MappedFolders> <MappedFolder> <HostFolder>C:\SandboxScripts</HostFolder> <ReadOnly>true</ReadOnly> </MappedFolder> <MappedFolder> <HostFolder>C:\CodingProjects</HostFolder> <ReadOnly>false</ReadOnly> </MappedFolder> </MappedFolders> <LogonCommand> <Command>C:\Users\WDAGUtilityAccount\Desktop\SandboxScripts\VSCodeInstall.cmd</Command> </LogonCommand> </Configuration>
Windows Sandbox is a useful feature that lets users test software or experiment with configuration changes, without touching the host OS or configuring a VM manually. The only real disadvantage is that the Windows Sandbox VM never survives a reboot, which limits its application because some software cannot be installed without restarting Windows.
More in Windows 10
Microsoft Offers Temporary Fix for Start menu or UWP App Freezing Issues on Windows 11 and 10
Jan 26, 2023 | Rabia Noureen
Microsoft Releases a Script to Recover Some Windows App Shortcuts Deleted on Friday 13
Jan 16, 2023 | Rabia Noureen
[Updated] Microsoft to Fix Defender Bug Deleting Windows Apps Shortcuts from Taskbar
Jan 13, 2023 | Rabia Noureen
Microsoft FastTrack Now Helps IT Admins Deploy Windows Autopatch at No Additional Cost
Jan 13, 2023 | Rabia Noureen
Most popular on petri