.wsb text file can turn it from a blank slate into a repeatable test bench. That is useful if your Downloads folder looks like a clearance rack of half-evaluated utilities. This guide covers what Sandbox needs, how to turn it on, and how to build an offline profile and a connected profile. It also covers the security trade-offs Microsoft documents.
What Windows Sandbox is, and what it isn't
Microsoft pitches Sandbox as a clean environment for testing or running potentially harmful software. Microsoft's documentation describes it as a lightweight, isolated desktop that uses hardware-based virtualization. It relies on the Microsoft hypervisor to run a separate kernel, which keeps it apart from the host.
The key behaviors are:
- It's temporary. Closing Sandbox deletes all software, files and state, and each launch starts fresh.
- Your host apps aren't there. Anything you want to test must be installed inside the sandbox.
- Restarts are the exception. Since Windows 11 version 22H2, data survives restarts started from inside Sandbox. That helps with installers that demand a reboot. Closing Sandbox itself still wipes everything.
- One instance at a time. Microsoft says Sandbox doesn't currently support multiple simultaneous instances.
This is why Sandbox beats a traditional virtual machine for quick "do I like this app?" tests. You skip maintaining a saved Windows install.
Requirements: who can use it
Sandbox is limited by edition. Microsoft lists Windows Pro, Enterprise, Pro Education/SE and Education as supported. Windows Home is not supported.
Microsoft's prerequisites are:
- Windows 10 version 1903 or later, or Windows 11
- AMD64 architecture, or Arm64 on Windows 11 version 22H2 and later
- Virtualization enabled in the BIOS/UEFI on a physical machine
- At least 4 GB of RAM (8 GB recommended)
- At least 1 GB of free disk space (an SSD is recommended)
- At least two CPU cores (four with hyper-threading recommended)
If you run Windows inside a virtual machine, you need nested virtualization enabled on that VM. Microsoft's setup page gives two host-side PowerShell commands for this: Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true and Update-VMVersion -VMName <VMName>.
Turning Sandbox on
- Type Turn Windows features on or off into Start search.
- Tick Windows Sandbox and click OK.
- Restart if Windows asks.
- Find Windows Sandbox in Start and open it.
If you prefer PowerShell, open it as Administrator and run Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online.
If the option doesn't appear, Microsoft says your machine doesn't meet the requirements. Check the edition first, then the CPU architecture, then whether virtualization is on in firmware.
One 24H2 caveat applies. Microsoft's install page says inbox Store apps such as Calculator, Photos, Notepad and Terminal aren't available inside Sandbox starting with Windows 11 version 24H2. Microsoft says support will be added later. Don't build a test plan around those built-in apps.
Why the default session deserves a second look
A plain launch from Start is convenient but permissive. According to Microsoft Learn, the default session has these settings:
- Networking is enabled, through the Hyper-V default switch.
- Audio input is enabled, which shares your host microphone.
- Clipboard redirection is enabled, so text and files can be pasted back and forth.
- The virtual GPU is enabled on non-Arm64 devices.
- Video input, printer redirection and Protected Client mode are off.
Microsoft flags that enabled networking can expose untrusted applications to the internal network. That is the main reason to use a .wsb file.
Building the offline profile
A .wsb file is plain XML. Sandbox configuration files are formatted as XML and are associated with Sandbox through the .wsb extension. To use one, double-click it. Microsoft says you can also invoke it from the command line.
Step 1: Make a small input folder. Create C:\SandboxInput and put only the installer or test file you want to inspect in it. Microsoft says the host folder must already exist, or the container fails to start.
Step 2: Write the file. Open Notepad and paste:
<Configuration>
<VGpu>Disable</VGpu>
<Networking>Disable</Networking>
<AudioInput>Disable</AudioInput>
<ClipboardRedirection>Disable</ClipboardRedirection>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\SandboxInput</HostFolder>
<SandboxFolder>C:\SandboxInput</SandboxFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>explorer.exe C:\SandboxInput</Command>
</LogonCommand>
</Configuration>
Step 3: Save it with the right extension. Choose File > Save as, set the type to All files, and name it "OfflineTest.wsb" with the quotation marks. Microsoft recommends the quotes in Notepad so it doesn't append .txt.
Step 4: Launch it. Double-click the file. Sandbox should open with File Explorer already showing your test folder.
What each setting does
| Setting | Effect |
|---|---|
Networking = Disable | Cuts network access, which Microsoft says decreases the attack surface |
ClipboardRedirection = Disable | Restricts copy and paste between host and sandbox |
AudioInput = Disable | Stops the host microphone being shared |
VGpu = Disable | Uses software rendering (WARP), which may be slower |
ReadOnly = true | Enforces read-only access to the shared folder; the default is false |
LogonCommand | Runs one command after logon; mapped folders are mounted before it runs |
Microsoft also recommends this general pattern, with networking disabled and a read-only mapped folder, for opening untrusted files or applications.
Where the offline profile gets awkward
- Installers that download components will fail, because there's no network.
- Apps that write next to their installer may fail on a read-only share. Copy the installer to a normal folder inside Sandbox first. That copy disappears when Sandbox closes.
- Graphics-heavy apps may feel sluggish with the virtual GPU off. Microsoft says enabling it can increase attack surface, so this is a real trade-off.
- Voice or camera apps won't work properly without audio or video input.
A connected profile for everyday testing
Duplicate the file, name it ConnectedTest.wsb, and change Networking from Disable to Enable. You now have one profile for offline inspection and one for installers that need the web.
Treat the connected profile as a convenience tool. Microsoft says network access can expose untrusted software to the internal network. The same caution applies to anything you test with it.
Other options worth knowing
- MemoryInMB sets a memory limit. If the value is too low to boot, Microsoft says it is automatically raised to 2048 MB.
- VideoInput and PrinterRedirection control webcam and printer sharing.
- ProtectedClient runs Sandbox inside AppContainer Isolation for extra isolation. Microsoft warns it may restrict copy and paste.
- LogonCommand runs a single command. For multi-step setups, Microsoft advises putting the steps in a script, mapping it in through a shared folder, and calling it from the logon command.
Use a different file for each job. A dev-tool test, a suspicious-attachment check and a driver-free app trial don't need the same permissions.
Mapped folder safety
- A read-only share stops writes through that mapping. It doesn't hide the folder's contents from apps in the sandbox.
- Microsoft warns that mapped files can be compromised by sandbox apps or potentially affect the host.
- Changes to a writable mapped folder persist after Sandbox is disposed.
The practical rule is to map a small, purpose-made folder. Don't hand over Documents.
Is Sandbox enough for malware analysis?
No. It adds a useful hypervisor-backed layer, but the Microsoft guidance quoted above is about reducing risk, not guaranteeing safety. Serious malware analysis belongs in dedicated tools and properly isolated labs. For checking whether a PDF reader or image viewer behaves, Sandbox is a good fit.
Windows 11 24H2 and the newer Sandbox
Microsoft says Windows 11 24H2 can use a newer Sandbox version delivered through the Microsoft Store. It adds runtime controls in a three-dot menu for clipboard, audio and video input, and folder sharing. Saved .wsb profiles still matter because they give you the same startup settings every time. They also let you combine the logon command and mapped folders in one double-click.
Quick checklist
- Confirm you're on Pro, Enterprise, Pro Education/SE or Education, not Home.
- Enable virtualization in firmware and turn on the Windows Sandbox feature.
- Create a minimal input folder.
- Save
OfflineTest.wsbwith the.wsbextension and double-click it. - Make
ConnectedTest.wsbonly for installers that need the internet. - Close Sandbox when you're done and confirm the deletion prompt. Your
.wsbfiles and host folders remain untouched.
Sandbox won't make risky software safe. It does keep trial installs off your real PC, and a few lines of XML make that routine instead of a chore.
References
- Windows has a throwaway desktop, and one configuration file makes it far more useful MakeUseOf · 2026-11-21T12:30:16+00:00
- Use and configure Windows Sandbox | Microsoft Learn learn.microsoft.com
- Windows Sandbox learn.microsoft.com