How to Enable or Disable Windows Sandbox in Windows 10
Starting with Windows 10 build 18305, Microsoft introduced Windows Sandbox.
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.
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.
How many times have you downloaded an executable file, but were afraid to run it? Have you ever been in a situation which required a clean installation of Windows, but didn’t want to set up a virtual machine?
At Microsoft, they regularly encounter these situations, so they developed Windows Sandbox: an isolated desktop environment where you can run untrusted software without the fear of lasting impact to your device. Any software installed in Windows Sandbox stays only in the sandbox and cannot affect your host. Once Windows Sandbox is closed, all the software with all of its files and state are permanently deleted.
When Windows Sandbox is enabled a read-only 8 GB PortableBaseLayer system partition without a drive letter is automatically created and should not be deleted. The PortableBaseLayer partition is automatically removed when Windows Sandbox is disabled.
Windows Sandbox has the following properties:
- Part of Windows – everything required for this feature ships with Windows 10 Pro and Enterprise. No need to download a VHD!
- Pristine – every time Windows Sandbox runs, it’s as clean as a brand-new installation of Windows
- Disposable – nothing persists on the device; everything is discarded after you close the application
- Secure – uses hardware-based virtualization for kernel isolation, which relies on the Microsoft Hypervisor to run a separate kernel which isolates Windows Sandbox from the host
- Efficient – uses integrated kernel scheduler, smart memory management, and virtual GPU
Prerequisites for using the feature
- Windows 10 Pro or Enterprise build 18305 or higher
- AMD64 architecture (64-bit)
- Virtualization capabilities enabled in BIOS
- At least 4GB of RAM (8GB recommended)
- At least 1 GB of free disk space (SSD recommended)
- At least 2 CPU cores (4 cores with hyperthreading recommended)
Using Windows Sandbox
- To start Windows Sandbox (if enabled), open the Start menu, enter Windows Sandbox and then select it.
- When prompted by UAC, click/tap on Yes.
- Copy (Ctrl+C) an executable file from the host.
- Paste (Ctrl+V) the executable file in the window of Windows Sandbox (on the Windows desktop).
- Run the executable in the Windows Sandbox; if it is an installer go ahead and install it.
- Run the application in the Windows Sandbox and use it as you normally do.
- When you’re done experimenting, you can simply close the Windows Sandbox application, and click/tap on OK to confirm. All sandbox content will be discarded and permanently deleted.
See also:
- Windows Sandbox | Microsoft Docs
- Windows Sandbox - Windows Kernel Internals
- Windows Sandbox - Config Files - Microsoft Tech Community - 354902
Starting with Windows 10 build 18342:
- Microsoft fixed an issue where Windows Sandbox would not start on localized builds.
- Microsoft have done some work to improve error reporting in Windows Sandbox. Now the error dialog includes the error code and a link to the Feedback Hub.
- Microsoft fixed an issue where Windows Sandbox was unexpectedly throwing an error due to referencing a deleted file under Windows.old.
- Windows Sandbox now captures hotkeys in full screen.
- Windows Sandbox now supports configuration files! These files allow users to configure some aspects of the sandbox, such as vGPU, networking and shared folders. A blog post to explain this new feature will be available here.
Starting with Windows 10 build 18353:
- Microsoft enabled microphone in Windows Sandbox, which among other things with improve several accessibility scenarios.
- Microsoft added functionality to configure the audio input device via the Windows Sandbox config file.
- Microsoft fixed an issue in which the Windows Sandbox time zone was not synchronized with the host.
- Microsoft enabled the Shift + Alt + PrintScreen key sequence in Windows Sandbox which activates the ease of access dialog for enabling high contrast mode.
- Microsoft enabled the ctrl + alt + break key sequence in Windows Sandbox which allows entering/exiting fullscreen mode.
Starting with Windows 10 build 18936, running Windows Sandbox no longer requires Administrator privilege.
This tutorial will show you how to use and enable or disable the Windows Sandbox feature for all users in Windows 10 Pro, Enterprise, or Education.
You must be signed in as an administrator to enable or disable and use Windows Sandbox.
Contents
- Option One: Enable or Disable Windows Sandbox in Windows Features
- Option Two: Enable or Disable Windows Sandbox in PowerShell
- Option Three: Enable or Disable Windows Sandbox in Command Prompt
EXAMPLE: Windows Sandbox
1 If you are enabling Windows Sandbox, you will need to make sure Virtualization is enabled in your UEFI/BIOS settings first. You can confirm if Virtualization is enabled in Task Manager. (see screenshots below)
You may need to reference your motherboard's or PC's manual for exactly how to enable the Virtualization UEFI/BIOS setting for it.
2 Open the Control Panel (icons view), and click/tap on the Programs and Features icon.
3 Click/tap on the Turn Windows features on or off link on the left side. (see screenshot below)
This will open the C:\Windows\System32\OptionalFeatures.exe file.
4 Check (enable) or uncheck (disable - default) Windows Sandbox, and click/tap on OK when finished. (see screenshot below)
5 When ready, click/tap on Restart now to restart the computer to apply. (see screenshot below)
1 If you are enabling Windows Sandbox, you will need to make sure Virtualization is enabled in your UEFI/BIOS settings first. You can confirm if Virtualization is enabled in Task Manager. (see screenshots below)
You may need to reference your motherboard's or PC's manual for exactly how to enable the Virtualization UEFI/BIOS setting for it.
2 Open an elevated PowerShell.
3 Copy and paste the command below you want to use into the elevated PowerShell, and press Enter. (see screenshots below)
(enable Windows Sandbox)
Enable-WindowsOptionalFeature –FeatureName "Containers-DisposableClientVM" -All -Online
OR
(disable Windows Sandbox - default)
Disable-WindowsOptionalFeature –FeatureName "Containers-DisposableClientVM" -Online
4 When prompted to restart the computer, type Y, and press Enter when ready to do so.
1 If you are enabling Windows Sandbox, you will need to make sure Virtualization is enabled in your UEFI/BIOS settings first. You can confirm if Virtualization is enabled in Task Manager. (see screenshots below)
You may need to reference your motherboard's or PC's manual for exactly how to enable the Virtualization UEFI/BIOS setting for it.
2 Open an elevated Command Prompt.
3 Copy and paste the command below you want to use into the elevated command prompt, and press Enter. (see screenshots below)
(enable Windows Sandbox)
Dism /online /Enable-Feature /FeatureName:"Containers-DisposableClientVM" -All
OR
(disable Windows Sandbox - default)
Dism /online /Disable-Feature /FeatureName:"Containers-DisposableClientVM"
4 When prompted to restart the computer, type Y when ready to do so.
That's it,
Shawn
Related Tutorials
- How to Enable Windows Sandbox Feature in Windows 10 Home Edition
- How to Turn On or Off Core Isolation Virtualization-based Security for Memory Integrity in Windows 10
- How to configure Windows Sandbox with custom theme and preinstalled software in Windows 10
- How to Enable or Disable Audio Input in Windows Sandbox in Windows 10
- How to Enable or Disable Clipboard Sharing with Windows Sandbox in Windows 10
- How to Enable or Disable Networking in Windows Sandbox in Windows 10
- How to Enable or Disable Printer Sharing with Windows Sandbox in Windows 10
- How to Enable or Disable Virtualized GPU (vGPU) Sharing for Windows Sandbox in Windows 10
- How to Enable or Disable Video Input in Windows Sandbox in Windows 10