/
/

How to Enable or Disable Clipboard Sharing with Windows Sandbox in Windows 10

How to Enable or Disable Clipboard Sharing with Windows Sandbox in Windows 10 blog banner image

Windows Sandbox is a lightweight desktop environment designed to safely run untrusted applications in isolation. When the Sandbox is closed, all software, files, and changes are discarded. By default, Sandbox supports Windows clipboard sharing, allowing copy-and-paste operations between the host and the Sandbox. However, disabling this feature increases isolation by preventing data exchange across environments.

This is especially useful for strengthening security, preventing data leakage, and ensuring compliance in regulated environments. This guide will show you how to enable and disable clipboard sharing with Windows Sandbox on Windows 10.

How to enable or disable clipboard sharing

Before proceeding, make sure you meet the following requirements:

  • You are using Windows 10 Pro or Enterprise, build 18342.
  • The Windows Sandbox feature is enabled (see the section below for steps on enabling it in Windows 10).
  • Virtualization is enabled in BIOS/UEFI.
  • You have administrative privileges to configure .wsb configuration files.

Once these are met, follow the steps below to enable or disable clipboard sharing with Windows Sandbox:

Create or edit a Sandbox configuration file

  1. Press Win + S to open the search bar.
  2. Type Notepad and click on it in the results.

Insert clipboard sharing configuration

  1. Paste one of the following configurations inside the Notepad file.
    • To enable clipboard sharing, use:

<Configuration>

<ClipboardRedirection>Enable</ClipboardRedirection>

</Configuration>

    • To disable clipboard sharing, use:

<Configuration>

<ClipboardRedirection>Disable</ClipboardRedirection>

</Configuration>

Save and run the Sandbox

  1. Click File > Save As.
  2. Enter a filename and save it with a .wsb extension.
    • Example: CustomSandbox.wsb

Note: Clipboard sharing is controlled via a .wsb (Windows Sandbox configuration) file.

  1. Set Save as type to All Files.
  2. Set Encoding to UTF-8.
  3. Click Save.
  4. Double-click the file you created to launch Windows Sandbox with the specified configuration.

Note that these settings only apply when Windows Sandbox is launched via the .wsb file you created. Opening Sandbox through the default shortcut will not use your custom configuration.

Notes and additional options

Other .wsb configuration options

You can also combine clipboard settings with other features such as folder mapping, networking, or GPU support:

<Configuration>

<ClipboardRedirection>Enable</ClipboardRedirection>

<MappedFolders>

<MappedFolder>

<HostFolder>C:\Test</HostFolder>

<ReadOnly>true</ReadOnly>

</MappedFolder>

</MappedFolders>

<Networking>Enable</Networking>

<VGpu>Enable</VGpu>

</Configuration>

These options give you greater flexibility when setting up a secure and functional Sandbox environment tailored to your testing or administrative needs.

Default behavior

If you don’t use a configuration file, clipboard sharing is enabled by default.

Security considerations

Disabling clipboard sharing improves Sandbox isolation, which is recommended when running untrusted or potentially harmful software inside the Sandbox.

How to enable the Windows Sandbox feature in Windows 10

If the Windows Sandbox feature isn’t enabled, you won’t be able to configure clipboard sharing. Here are simple steps to enable Windows Sandbox in Windows 10:

  1. Press Win + R to open the Run Dialog box.
  2. Type optionalfeatures.exe and click Enter to open the Windows Features.
  3. Scroll down and check the box next to Windows Sandbox.
  4. Click OK, then restart your PC if prompted.

Troubleshooting common issues

Issue: Sandbox doesn’t launch

If Windows Sandbox isn’t launching, it may not be enabled in your system settings. To enable it:

  1. Press Win + S to open the search bar.
  2. Type Control Panel and select it from the results.
  3. Click Programs.
  4. Under Programs and Features, tap Turn Windows features on or off.
  5. Check the box next to Windows Sandbox.
  6. Click OK, then restart your computer if prompted.

Issue: Clipboard still works after setting Disable

Make sure you’re launching Windows Sandbox using the correct .wsb file and that it’s properly formatted. To verify:

  1. Right-click the .wsb file and choose Open with > Notepad.
  2. Confirm that it contains exactly the following:

<Configuration>

<ClipboardRedirection>Disable</ClipboardRedirection>

</Configuration>

  1. Ensure there are no typos, spaces, or missing tags.
  2. Save the file, then double-click it to launch Windows Sandbox with the updated settings.

Issue: File associations not recognized

Remember that Windows Sandbox starts with a default Windows environment every time. This means custom file associations or non-default apps may not be recognized. However, to ensure the .wsb file loads correctly, verify that it’s saved with UTF-8 encoding and follows a valid XML structure to prevent formatting errors.

Frequently Asked Questions (FAQ)

What is the purpose of Windows Sandbox?

Windows Sandbox is designed to run applications in isolation safely. It allows you to test software, browse untrusted websites, or execute potentially harmful files and scripts without risking your main system. Each time you open the Sandbox, it launches a clean copy of Windows. When you close it, all changes, files, and installed apps are completely erased.

What is clipboard sharing?

Clipboard sharing is copying and pasting text, files, or other data between your host system and the Windows Sandbox. This feature helps transfer bits of information easily during testing.

Can I dynamically toggle clipboard sharing while the Sandbox is running?

No. Clipboard sharing settings are applied only at launch via the .wsb configuration file. Once the Windows Sandbox runs, you cannot restrict or allow clipboard access without closing and relaunching it with a new configuration.

Can I disable clipboard sharing system-wide for all sandboxes?

Yes. While Windows Sandbox settings are configured per session using .wsb files, you can enforce system-wide clipboard sharing behavior using Local Group Policy or the Windows Registry.

⚠️ Warning: Editing Group Policy or Registry Editor can cause system issues if done incorrectly. Always back up your registry before making changes, and proceed with caution.

Disable clipboard sharing using the Local Group Policy

  1. Press Win + R to open the Run Dialog box.
  2. Type gpedit.msc and click Enter to open the Local Group Policy Editor.
  3. Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Sandbox.
  4. Double-click Allow clipboard sharing with Windows Sandbox.
  5. Set it to Disabled, then click OK.

Disable clipboard sharing using Registry Editor

  1. Press Win + R to open the Run Dialog box.
  2. Type regedit and click Enter to open the Registry Editor.
  3. Navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox

  1. Locate AllowClipboardRedirection and set its value to 0.
    • If it doesn’t exist, create a new DWORD (32-bit) value and name it AllowClipboardRedirection, then set its value to 0.
  1. Restart your computer to apply changes.

⚠️ Important note: If Group Policy or Registry settings are applied, they will override .wsb configurations.

Does disabling clipboard sharing affect other Sandbox features?

No. Disabling clipboard sharing only prevents the copy-paste interactions between the host and the Sandbox. Other features remain unaffected unless separately configured.

Manage clipboard sharing with Windows Sandbox in Windows 10

Controlling clipboard redirection in Windows 10 Sandbox allows administrators to clearly define boundaries between the host system and the isolated environment. This is especially useful for scenarios that require strict isolation.

Clipboard sharing is enabled by default but can be explicitly disabled using a .wsb configuration file. This guide provides clear instructions on how to manage clipboard sharing and includes troubleshooting steps in case you encounter issues during the setup.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).