How to enable Windows Sandbox on Windows 11, 10
- To enable Windows Sandbox, open “Windows Features,” check “Windows Sandbox,” click “OK,” and restart the computer.
- You can also enable the feature with commands using Command Prompt and PowerShell.
On Windows 11 (and 10), “Windows Sandbox” is a minimal installation of Windows isolated from the main installation that allows you to run untrusted applications without exposing your device.
Sandbox is available on the Pro and Enterprise editions of Windows, and it uses Microsoft’s Hyper-V technology to create a disposable lightweight virtual machine on-demand to run a separate kernel that separates the Windows Sandbox session from the host.
In other words, this is a small installation of Windows 11 (or Windows 10) of just around 100MB, enough to run the desktop environment and test applications. You can even copy and paste files from the host to the isolated environment. Once you finish testing the application, closing the feature will delete the Sandbox environment, which means that every time you start the feature, you will start with a fresh install of Windows 11.
Windows Sandbox requires virtualization in the Unified Extensible Firmware Interface (UEFI) on Windows 11 or 10 or Basic Input/Output System (BIOS) on Windows 10 before you can use the feature. You can use these instructions to enable hardware virtualization in the motherboard before proceeding with the steps below.
In this guide, I will teach you the steps to enable Windows Sandbox on Windows.
- Enable Windows Sandbox from Windows Features
- Enable Windows Sandbox from PowerShell
- Enable Windows Sandbox from Command Prompt
Enable Windows Sandbox from Windows Features
To enable “Windows Sandbox” to run untrusted apps on Windows 11 (or 10), use these steps:
-
Open Start on Windows.
-
Search for Turn Windows features on or off and click the top result to open the experience.
-
Check the Windows Sandbox option.
-
Click the OK button.
-
Click the Restart now button.
After you complete the steps, you can start the app from the Start menu.
If you want to disable the feature, you can use the same instructions, but in step 3, clear the option.
Enable Windows Sandbox from PowerShell
To enable Windows Sandbox with PowerShell commands, use these steps:
-
Open Start.
-
Search for PowerShell, right-click the top result, and select the Run administrator option.
-
Type the following command to enable Sandbox users and press Enter:
Enable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM"-All
-
Type “Y” and press enter to restart the computer
Once you complete the steps, the feature will be enabled and ready from the Start menu.
如果您想要撤銷更改,可以使用相同的說明,但在步驟 3中執行Disable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM"
命令。
從命令提示字元啟用 Windows 沙箱
若要使用命令提示字元命令開啟 Windows Sandbox,請使用下列步驟:
-
打開開始。
-
搜尋「命令提示字元」,右鍵點選頂部結果,然後選擇「執行管理員」選項。
-
鍵入以下命令以啟用 Windows Sandbox 並按Enter:
Dism /online /Enable-Feature /FeatureName:"Containers-DisposableClientVM"-All
-
輸入“Y”並按 Enter 重新啟動計算機
完成這些步驟後,您可以開始使用 Windows Sandbox 來測試應用程式並造訪不受信任的網站,而不會影響主安裝。
如果您想要撤銷更改,可以使用相同的說明,但在步驟 3中執行Dism /online /Disable-Feature /FeatureName:"Containers-DisposableClientVM"
命令。
首先,從「開始」功能表開啟 Windows Sandbox,然後您將看到一個常規的 Windows 桌面環境,您可以在其中安裝和運行不受信任的應用程序,而不會影響當前安裝。關閉應用程式後,您將刪除整個虛擬機器以及已安裝的所有內容。
2024 年 6 月 19 日更新:本指南已更新,以確保準確性並反映流程的變更。
發佈留言