How to install and open Windows 11 sandbox using CMD?

Windows 11 or 10’s Sandbox is a great feature to test vulnerable applications and experiment with settings or programs without affecting or changing the settings of the main system.

A few features make the Windows Sandbox worth using, especially for developers, including “Isolation“. Sandbox runs itself in a containerized environment to have isolation from the rest of the system, ensuring the host operating system will have a layer of security from the applications used in Sandbox.

Further, Windows Sandbox is quick to set up and accessible like any other regular Windows software without using any third-party virtualization platform. Plus, there will not be any performance impact on the host because Sandbox operates independently.

Moreover, it is designed to be disposable, which means as the user closes the Sandbox all the files and changes made during the session will be deleted, and when the next time the user starts the Sandbox, it will be opened in a cleaned state. You would like to learn how we can run Microsoft Edge in Sandbox with Windows Defender Application Guard.

We can also drag and drop the files from the host to Sandbox which also makes it user-friendly to use as well.

However, before enabling the Windows Sandbox, ensure virtualization is enabled in the BIOS/UEFI settings. Also, when we talk about virtualization Hyper-V would be the platform most people want to use on Windows 11 unfortunately, it is not available for the Home edition, but you can still have it using our guide – How to Download and install Hyper-V on Windows 11 Home

Two applications on Windows let users issue commands for managing the system and to perform other tasks – one is Command Prompt and the other is PowerShell. We learn how to use both for installing and enabling the Windows Sandbox feature.

Sandbox Installation Steps using CMD

DISM” is the command that allows users to enable various Windows features using the Command Prompt, here we learn how to use it for Sandbox. Also, before moving to follow the steps make sure the Virtualization is enabled in BIOS, here is our article to read, if you don’t know how to check virtualization enabled on Windows 11 or 10 without accessing BIOS menu

  1. Click on the Windows start button and search for “CMD“.
  1. Select the “Run as administrator” option that appears on the right side in the results to open a command prompt with Administrative rights.
  1. Execute the given command to enable the Windows Sandbox feature
dism /online /enable-feature /featurename:Containers-DisposableClientVM /all /norestart
  1. Restart the PC or Laptop, once the command is executed successfully to use the Windows Sandbox feature.
Enable Windows Sandbox using CMD
  1. To run Sandbox, go to the Start menu and search for it, click on its icon when it appears in the search result.
RUn Windows Sandbox from Start Menu using command

Installing Windows Sandbox using PowerShell

Well, the command prompt is not the only command line way to enable the Sandbox, we can also use PowerShell with the help of “Enable-WindowsOptionalFeature“, here are the steps to follow:

  1. Right-click on the Windows 11 or 10 start button or press the Win key + X keys.
  1. From the Pop-up menu select the “Terminal (Admin) or PowerShell (Admin)” option.
Open Windows Terminal
  1. After that execute the given command to enable Windows Sandbox using PowerShell and hit the Enter key:
Enable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM" -All
  1. The command will ask you to restart the system so that you can use the Sandbox feature properly. Press “Y” and hit the Enter key.
Install Windows 11 or 10 Sanbox using powerShell

The command for Opening Windows 11 Sandbox:

Once the installation is completed, we can also use the command prompt or PowerShell to open the Windows Sandbox instead of using the GUI.

  1. Open CMD:
    • Press Windows Key + S to open the search bar.
    • Type cmd and press Enter to open the Command Prompt.
  2. Start Windows Sandbox:
    • Type the following command and press Enter key: WindowsSandbox.exe
  3. Windows Sandbox Opens:
    • The Windows 11 or 10 Sandbox will open like a Virtualbox guest – that is in a separate window. It provides an isolated environment for testing but still with ability to drag and drop files without installing any additional driver or software.
Command to Install Windows Sandbox in CMD

How to run Windows Sandbox as Administrator?

  1. Go to the Windows 10 or 11 Start button, and click to open the Menu.
  2. Search for Windows Sandbox
  3. Ad it appears either right-click on it to select “Run as Administrator” or the same option can be selected from the right-hand side menu.
  4. The system will prompt User Account Control (UAC) for your permission, click the Yes button.
  5. Wait for the system to open and load Window Sandbox with Administrative rights or elevated Privileges.
image

Other Articles: