Skip to content

3 Quick Ways to Enable Windows Sandbox on Windows 11

3 Quick Ways to Enable Windows Sandbox on Windows 11 jpg

In this article, we’ll explore three quick ways to enable Windows Sandbox on Windows 11. Windows Sandbox is an incredible tool that lets you test untrusted applications on your computer. It provides a lightweight desktop environment to safely test applications without affecting the host machine.

If you want to activate Windows Sandbox on Windows 11, then you’ve come to the right place. Here we’ll share three quick ways to enable or set up Windows Sandbox on Windows 11. Let’s begin.

How to Enable Windows Sandbox on Windows 11

There are three ways to install Windows Sandbox on Windows 11. Let’s check out each method one by one.

Enable Windows Sandbox Using Windows Features

The Windows Features dialog contains all the optional Windows features you can install on your computer. You can use it to activate Windows Sandbox as well. Here’s how:

  1. Press the Windows key to open the Start Menu. Then, type Turn Windows features on or off in the search bar and press Enter.
    Turn Windows features on or off option in Start Menu
  2. In the Windows Features dialog, check the Windows Sandbox option and click OK.
    Windows Sandbox option in Windows Features dialog

And that’s about it. Windows will now search for the required files to turn on Windows Sandbox and install them on your computer.

Once done, restart your computer. Then, launch Sandbox by searching for it in the Windows search bar.

Read: How to Create a System Restore Point in Windows 11/10

Enable Windows Sandbox Using PowerShell

If you’re a power user, you can use Windows PowerShell to enable Windows Sandbox on your computer. Here are the steps to do that:

  1. Open the Start Menu, type Windows PowerShell in the search bar, and choose Run as administrator from the right pane.
    Windows PowerShell in Start Menu
  2. Type the following command in the PowerShell window and press Enter.
    Enable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM" -All

    PowerShell command to Enable Windows Sandbox

Enable Windows Sandbox Using Command Prompt

Similar to Windows PowerShell, you can activate Windows Sandbox using Command Prompt. However, unlike PowerShell, we’ll run a DISM command in Command Prompt to turn on Windows Sandbox. Here are the steps to do that:

  1. Launch the Start Menu, type Command Prompt in the search box, and click on the Run as administrator option in the right pane.
    Command Prompt in Start Menu
  2. Type the following command and press Enter to install Windows Sandbox.
    dism /online /Enable-Feature /FeatureName: "Containers-DisposableClientVM" -All

    Command Prompt command to Enable Windows Sandbox

How to Enable Windows Sandbox on Windows 11 Home

Tools like Windows Sandbox, Group Policy Editor, and Hyper-V are only limited to Windows Pro, Business, and Education editions. If you want to install them on Windows Home, you will have to run a batch script.

To install Windows Sandbox on Windows 11 Home Edition, follow the below instructions:

  1. To begin with, access the UEFI menu on your computer and enable Virtualization. Then, restart your computer.
    Virtualization option in UEFI menu
  2. Open the Start Menu, type Notepad, and press Enter.
    Notepad in Start Menu
  3. Paste the following script in the Notepad:
    @echo off
    
    echo Checking for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    
    echo Permission check result: %errorlevel%
    
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    
    :UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    
    echo Running created temporary "%temp%\getadmin.vbs"
    timeout /T 2
    "%temp%\getadmin.vbs"
    exit /B
    
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0" 
    
    echo Batch was successfully started with admin privileges
    echo .
    cls
    Title Sandbox Installer
    
    pushd "%~dp0"
    
    dir /b %SystemRoot%\servicing\Packages\*Containers*.mum >sandbox.txt
    
    for /f %%i in ('findstr /i . sandbox.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    
    del sandbox.txt
    
    Dism /online /enable-feature /featurename:Containers-DisposableClientVM /LimitAccess /ALL
    
    pause

    Batch script to enable Windows Sandbox

  4. Click the File option at the top-right corner and choose Save as from the context menu.
  5. Type SandboxEnabled.bat in the File name field.
    SandboxEnabled name in Name field
  6. Click the Save button.
  7. Right-click on the SandboxEnabled.bat file and choose Run as administrator.
    Run as admin option in context menu
  8. Command Prompt will now run the batch file to install Windows Sandbox.
  9. Once the process is complete, click Y to restart your computer.
    Y command to Enable Windows Sandox

After restart, open the Windows Features dialog and check the Windows Sandbox option to enable it.

How do I turn off Sandbox in Windows 11?

It’s very easy to turn off Sandbox in Windows 11. Simply open the Windows Features dialog on your computer and uncheck the Windows Sandbox option. Then, click OK and restart your computer for the changes to take effect.

Does Windows 11 have Sandbox mode?

Yes, Windows 11 have Sandbox mode. However, it is limited to Windows Pro, Business and Education Editions. You’ll have to manually enable Windows Sandbox on Windows 11 Home by running a batch file.

Read Next: 3 Easy Ways to Save ChatGPT Chats

Leave a Reply

Your email address will not be published. Required fields are marked *