Using windows sandbox with/without networking

First enable windows sandbox as a feature;

  1. Open Start.
  2. Search for Turn Windows features on or off, and click the top result to open the Windows Features experience.
  3. Check the Windows Sandbox option.
  4. Click the OK button.
  5. Click the Restart now button.

Then to create/use the sandbox you just make config files like this:

  1. Open Notepad.
  2. Click the File menu.
  3. Select the Save as option.
  4. Type a descriptive name and use the .wsb extension.

It can be as simple as this for no networking:

<Configuration>
  <Networking>Disable</Networking>
</Configuration>

Or this with networking:

<Configuration>
  <Networking>Default</Networking>
</Configuration>

You can also share a directory with the host machine that gets dumped as a shortcut onto the sandbox desktop:

<Configuration>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\share</HostFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>

& You can tell it to run something on boot;

<LogonCommand>
    <Command>calc.exe</Command>
</LogonCommand>