-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10520 from MicrosoftDocs/main
Published main to live, Friday 5:00 PM IST, 01/24
- Loading branch information
Showing
16 changed files
with
605 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
windows/security/application-security/application-isolation/toc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
items: | ||
- name: Microsoft Defender Application Guard (MDAG) | ||
href: microsoft-defender-application-guard/md-app-guard-overview.md | ||
- name: MDAG for Edge standalone mode | ||
href: microsoft-defender-application-guard/md-app-guard-overview.md | ||
- name: MDAG for Edge enterprise mode and enterprise management 🔗 | ||
href: /deployedge/microsoft-edge-security-windows-defender-application-guard | ||
- name: MDAG for Microsoft Office | ||
href: https://support.microsoft.com/office/application-guard-for-office-9e0fb9c2-ffad-43bf-8ba3-78f785fdba46 | ||
- name: MDAG configure via MDM 🔗 | ||
href: /windows/client-management/mdm/windowsdefenderapplicationguard-csp | ||
items: | ||
- name: MDAG for Microsoft Edge standalone mode | ||
href: microsoft-defender-application-guard/md-app-guard-overview.md | ||
- name: MDAG for Microsoft Edge enterprise mode and enterprise management 🔗 | ||
href: /deployedge/microsoft-edge-security-windows-defender-application-guard | ||
- name: MDAG for Microsoft Office | ||
href: https://support.microsoft.com/office/application-guard-for-office-9e0fb9c2-ffad-43bf-8ba3-78f785fdba46 | ||
- name: Configure MDAG via MDM 🔗 | ||
href: /windows/client-management/mdm/windowsdefenderapplicationguard-csp | ||
- name: App containers 🔗 | ||
href: /virtualization/windowscontainers/about | ||
- name: Windows Sandbox | ||
href: windows-sandbox/windows-sandbox-overview.md | ||
items: | ||
- name: Windows Sandbox architecture | ||
href: windows-sandbox/windows-sandbox-architecture.md | ||
- name: Windows Sandbox configuration | ||
href: windows-sandbox/windows-sandbox-configure-using-wsb-file.md | ||
href: windows-sandbox/index.md |
43 changes: 43 additions & 0 deletions
43
...ws/security/application-security/application-isolation/windows-sandbox/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Windows Sandbox | ||
description: Windows Sandbox overview | ||
ms.topic: overview | ||
ms.date: 09/09/2024 | ||
--- | ||
|
||
# Windows Sandbox | ||
|
||
Windows Sandbox (WSB) offers a lightweight, isolated desktop environment for safely running applications. It's ideal for testing, debugging, exploring unknown files, and experimenting with tools. Applications installed within the sandbox remain isolated from the host machine using hypervisor-based virtualization. As a disposable virtual machine (VM), Windows Sandbox ensures reboot persistence, quick launch times, and a lower memory footprint compared to full VMs. Its one-click setup simplifies the user experience. | ||
|
||
The sandbox is temporary; closing it deletes all software, files, and state. Each launch provides a fresh instance. Host-installed software isn't available in the sandbox. Applications needed within the sandbox must be installed there explicitly. | ||
|
||
> [!NOTE] | ||
> Starting with Windows 11, version 22H2, data persists through restarts initiated within the sandbox, useful for applications requiring a reboot. | ||
Windows Sandbox offers the following features: | ||
|
||
- **Part of Windows**: Everything required for this feature is included in the supported Windows editions like Pro, Enterprise, and Education. There's no need to maintain a separate VM installation. | ||
- **Disposable**: Nothing persists on the device. Everything is discarded when the user closes the application. | ||
- **Pristine**: Every time Windows Sandbox runs, it's as clean as a brand-new installation of Windows. | ||
- **Secure**: Uses hardware-based virtualization for kernel isolation. It relies on the Microsoft hypervisor to run a separate kernel that isolates Windows Sandbox from the host. | ||
- **Efficient**: Takes a few seconds to launch, supports virtual GPU, and has smart memory management that optimizes memory footprint. | ||
|
||
> [!IMPORTANT] | ||
> Windows Sandbox enables network connection by default. It can be disabled using the [Windows Sandbox configuration file](windows-sandbox-configure-using-wsb-file.md#networking). Enabling networking can expose untrusted applications to the internal network. | ||
WSB can be used without any technical skills in various scenarios where users need a secure, clean environment for testing or running potentially harmful software. Here are some ways in which you can use WSB: | ||
|
||
- **Clean environment for software testing**: Test or debug your applications in WSB's clean environment to identify and resolve bugs or compatibility issues. | ||
- **Secure web browsing**: Use WSB for secure web browsing, especially when accessing unfamiliar or potentially dangerous websites without putting your system at risk of malware infection. | ||
- **Running Untrusted Applications**: Mitigate security risks by opening untrusted applications or files, such as email attachments in WSB. Improve your safety and security by opening a sandbox with networking disabled and mapping the folder with the application or file you want to open to the sandbox in read-only mode. Check [Sample configuration files](windows-sandbox-sample-configuration.md) for more details. | ||
- **Testing or demoing new software for the first time**: Test drive or demo new software, preview versions, extensions, or add-ons without the hassle of installing and then uninstalling on your host machine. | ||
- **Maintaining multiple dev environments**: Streamline your development process by utilizing WSB to maintain multiple sandboxes for different development environments. For example, maintain a sandbox for each python version and its dependencies! | ||
|
||
> [!NOTE] | ||
> Windows Sandbox currently doesn't allow multiple instances to run simultaneously. | ||
|
||
[!INCLUDE [windows-sandbox](../../../../../includes/licensing/windows-sandbox.md)] | ||
|
||
> [!NOTE] | ||
> Windows Sandbox is currently not supported on Windows Home edition. |
26 changes: 26 additions & 0 deletions
26
windows/security/application-security/application-isolation/windows-sandbox/toc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
items: | ||
- name: Windows Sandbox | ||
href: index.md | ||
- name: Overview | ||
expanded: true | ||
items: | ||
- name: Windows Sandbox versions | ||
href: windows-sandbox-versions.md | ||
- name: Architecture | ||
href: windows-sandbox-architecture.md | ||
- name: Install Windows Sandbox | ||
href: windows-sandbox-install.md | ||
- name: Use & configure Windows Sandbox | ||
href: windows-sandbox-configure-using-wsb-file.md | ||
- name: Windows Sandbox command line interface | ||
href: windows-sandbox-cli.md | ||
- name: Tutorials | ||
items: | ||
- name: Sample configuration files | ||
href: windows-sandbox-sample-configuration.md | ||
- name: WindowsSandbox Policy CSP 🔗 | ||
href: /windows/client-management/mdm/policy-csp-windowssandbox | ||
- name: Frequently asked questions | ||
href: windows-sandbox-faq.yml | ||
- name: Troubleshooting | ||
href: windows-sandbox-troubleshoot.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
...plication-security/application-isolation/windows-sandbox/windows-sandbox-cli.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
title: Windows Sandbox command line | ||
description: Windows Sandbox command line interface | ||
ms.topic: how-to | ||
ms.date: 10/22/2024 | ||
--- | ||
|
||
# Windows Sandbox command line interface | ||
|
||
Starting with Windows 11, version 24H2, the Windows Command Line Interface (CLI) offers powerful tools for creating, managing, and controlling sandboxes, executing commands, and sharing folders within sandbox sessions. This functionality is especially valuable for scripting, task automation, and improving development workflows. In this section, you'll explore how the Windows Sandbox CLI operates, with examples demonstrating how to use each command to enhance your development process. | ||
|
||
**Common parameters**: | ||
|
||
- `--raw`: Formats all outputs in JSON format. | ||
- `-?, -h, --help`: Show help and usage information | ||
|
||
## Start | ||
|
||
The start command creates and launches a new sandbox. The command returns the sandbox ID, which is a unique identifier for the sandbox. The sandbox ID can be used to refer to the sandbox in other commands. | ||
|
||
- `--id <id>`: ID of the Windows Sandbox environment. | ||
- `--c, --config <config>`: Formatted string with the settings that should be used to create the Windows Sandbox environment. | ||
|
||
**Examples**: | ||
|
||
- Create a Windows Sandbox environment with the default settings: | ||
|
||
```cmd | ||
wsb start | ||
``` | ||
- Create a Windows Sandbox environment with a custom configuration: | ||
```cmd | ||
wsb start --config "<Configuration><Networking>Disabled</Networking></Configuration>" | ||
``` | ||
## List | ||
The list command displays a table that shows the information the running Windows Sandbox sessions for the current user. The table includes the sandbox ID. The status can be either running or stopped. The uptime is the duration that the sandbox has been running. | ||
```cmd | ||
wsb list | ||
``` | ||
|
||
## Exec | ||
|
||
The exec command executes a command in the sandbox. The command takes two arguments: the sandbox ID and the command to execute. The command can be either a built-in command or an executable file. The exec command runs the command in the sandbox and returns the exit code. The exec command can also take optional arguments that are passed to the process started in the sandbox. | ||
|
||
> [!NOTE] | ||
> Currently, there is no support for process I/O meaning that there is no way to retrieve the output of a command run in Sandbox. | ||
An active user session is required to execute a command in the context of the currently logged on user. Therefore, before running this command a remote desktop connection should be established. This can be done using the [connect](#connect) command. | ||
|
||
- `--id <id>` (REQUIRED): ID of the Windows Sandbox environment. | ||
- `-c, --command <command>` (REQUIRED): The command to execute within Windows Sandbox. | ||
- `-r, --run-as <ExistingLogin|System>` (REQUIRED): Specifies the user context to execute the command within. If the System option is selected, the command runs in the system context. If the ExistingLogin option is selected, the command runs in the currently active user session or fails if there's no active user session. | ||
- `-d, --working-directory <directory>`: Directory to execute command in. | ||
|
||
```cmd | ||
wsb exec –-id 12345678-1234-1234-1234-1234567890AB -c app.exe -r System | ||
``` | ||
|
||
## Stop | ||
|
||
The stop command stops a running Windows Sandbox session. The command takes the sandbox ID as an argument. | ||
|
||
The stop command terminates the sandbox process and releases the resources allocated to the sandbox. The stop command also closes the window that shows the sandbox desktop. | ||
|
||
```cmd | ||
wsb stop --id 12345678-1234-1234-1234-1234567890AB | ||
``` | ||
|
||
## Share | ||
|
||
The share command shares a host folder with the sandbox. The command takes three arguments: the sandbox ID, the host path, and the sandbox path. The host path should be a folder. The sandbox path can be either an existing or a new folder. An Additional, `--allow-write` option can be used to allow or disallow the Windows Sandbox environment to write to the folder. | ||
|
||
- `--id <id>` (REQUIRED): ID of the Windows Sandbox environment. | ||
- `-f, --host-path <host-path>` (REQUIRED): Path to folder that is shared from the host. | ||
- `-s, --sandbox-path <sandbox-path>` (REQUIRED): Path to the folder within the Windows Sandbox. | ||
- `-w, --allow-write`: If specified, the Windows Sandbox environment is allowed to write to the shared folder. | ||
|
||
```cmd | ||
wsb share --id 12345678-1234-1234-1234-1234567890AB -f C:\host\folder -s C:\sandbox\folder --allow-write | ||
``` | ||
|
||
## Connect | ||
|
||
The connect command starts a remote session within the sandbox. The command takes the sandbox ID as an argument. The connect command opens a new window with a remote desktop session. The connect command allows the user to interact with the sandbox using the mouse and keyboard. | ||
|
||
```cmd | ||
wsb connect --id 12345678-1234-1234-1234-1234567890AB | ||
``` | ||
|
||
## IP | ||
|
||
The ip command displays the IP address of the sandbox. The command takes the sandbox ID as an argument. | ||
|
||
```cmd | ||
wsb ip --id 12345678-1234-1234-1234-1234567890AB | ||
``` |
Oops, something went wrong.