Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To launch a Windows Sandbox with default settings, locate and select Windows Sandbox on the Start menu or search for 'Windows Sandbox'. This launches a basic Sandbox with maximum capacity of 4GB memory with the following properties:
Important
You have the freedom to open files, install applications from the web, and perform various other tasks that benefit from an isolated clean environment.
When you're finished experimenting, close the sandbox. A dialog box prompts you to confirm the deletion of all sandbox content. Select Ok to proceed. Confirm that your host machine doesn't exhibit any of the modifications that you made in Windows Sandbox.
Windows Sandbox supports simple configuration files, which provide a minimal set of customization parameters for Sandbox. This feature can be used with Windows 10 build 18342 or Windows 11. Windows Sandbox configuration files are formatted as XML and are associated with Sandbox via the .wsb
file extension.
A configuration file enables the user to control the following aspects of Windows Sandbox:
Note
The size of the sandbox window currently isn't configurable.
To create a configuration file:
Open a plain text editor or source code editor (for example, Notepad, Visual Studio Code, etc.)
Insert the following lines:
<Configuration>
</Configuration>
Add appropriate configuration text between the two lines. For details, see examples.
Save the file with the desired name, but make sure its filename extension is .wsb
. In Notepad, you should enclose the filename and the extension inside double quotation marks, for example, "MyConfigFile.wsb"
.
To use a configuration file, double-click it to start Windows Sandbox according to its settings. You can also invoke it via the command line as shown here:
C:\Temp> MyConfigFile.wsb
Enables or disables GPU sharing.
<vGPU>value</vGPU>
Supported values:
Note
Enabling virtualized GPU can potentially increase the attack surface of the sandbox.
Enables or disables networking in the sandbox. You can disable network access to decrease the attack surface exposed by the sandbox.
<Networking>value</Networking>
Supported values:
Note
Enabling networking can expose untrusted applications to the internal network.
An array of folders, each representing a location on the host machine that is shared with the sandbox at the specified path. Currently, relative paths aren't supported.
When using <Mappedfolders>
to map folders, the folders are mapped before the execution of the Logon command. Beginning in Windows 11, version 23H2, you can use environment variables in the path.
<MappedFolders>
<MappedFolder>
<HostFolder>absolute or relative path to the host folder</HostFolder>
<SandboxFolder>absolute path to the sandbox folder</SandboxFolder>
<ReadOnly>value</ReadOnly>
</MappedFolder>
<MappedFolder>
...
</MappedFolder>
</MappedFolders>
WDAGUtilityAccount
.Note
Files and folders mapped from the host can be compromised by apps in the sandbox or potentially affect the host. Changes made during a Sandbox session to a mapped folder with write-permissions will persist after a Sandbox is disposed.
Specifies a single command that will be invoked automatically after the sandbox logs on. Apps in the sandbox are run under the container user account. The container user account should be an administrator account.
<LogonCommand>
<Command>command to be invoked</Command>
</LogonCommand>
Command: A path to an executable or script inside the container that will be executed after signing in.
Note
Although very simple commands will work (such as launching an executable or script), more complicated scenarios involving multiple steps should be placed into a script file. This script file may be mapped into the container via a shared folder, and then executed via <LogonCommand>
.
Enables or disables audio input to the sandbox.
<AudioInput>value</AudioInput>
Supported values:
Note
There may be security implications of exposing host audio input to the container.
Enables or disables video input to the sandbox.
<VideoInput>value</VideoInput>
Supported values:
Note
There may be security implications of exposing host video input to the container.
When Protected Client mode is enabled, Sandbox adds a new layer of security boundary by running inside an AppContainer Isolation execution environment. AppContainer Isolation provides Credential, Device, File, Network, Process, and Window isolation.
<ProtectedClient>value</ProtectedClient>
Supported values:
Note
This setting may restrict the user's ability to copy/paste files in and out of the sandbox.
Enables or disables printer sharing from the host into the sandbox.
<PrinterRedirection>value</PrinterRedirection>
Supported values:
Enables or disables sharing of the host clipboard with the sandbox.
<ClipboardRedirection>value</ClipboardRedirection>
Supported values:
Specifies the amount of memory that the sandbox can use in megabytes (MB).
<MemoryInMB>value</MemoryInMB>
If the memory value specified is insufficient to boot a sandbox, it's automatically increased to the required minimum amount of 2048 MB.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!