You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: How to set up Windows Sandbox for Azure Virtual Desktop.
4
4
author: Heidilohr
5
5
ms.topic: how-to
6
-
ms.date: 07/29/2022
6
+
ms.date: 03/07/2023
7
7
ms.author: helohr
8
8
manager: femila
9
+
ms.custom: devx-track-azurepowershell
9
10
---
10
11
11
12
# Set up Windows Sandbox in Azure Virtual Desktop
@@ -43,63 +44,63 @@ To publish Windows Sandbox to your host pool:
43
44
44
45
1. Sign in to the Azure portal.
45
46
46
-
2. In the search bar, enter **Azure Virtual Desktop** and select the matching service entry.
47
+
1. In the search bar, enter **Azure Virtual Desktop** and select the matching service entry.
47
48
48
-
3. Select **Application groups**, then select the name of the application group in the host pool you want to publish Windows Sandbox to.
49
+
1. Select **Application groups**, then select the name of the application group in the host pool you want to publish Windows Sandbox to.
49
50
50
-
4. Once you're in the application group, select the **Applications** tab. The Applications grid will display all existing apps within the app group.
51
+
1. Once you're in the application group, select the **Applications** tab. The Applications grid will display all existing apps within the app group.
51
52
52
-
5. Select **+ Add** to open the **Add application** tab.
53
+
1. Select **+ Add** to open the **Add application** tab.
53
54
54
-
6. For **Application source**, select **File Path**.
55
+
1. For **Application source**, select **File Path**.
55
56
56
-
7. For **Application path**, enter **C:\windows\system32\WindowsSandbox.exe**.
57
+
1. For **Application path**, enter **C:\windows\system32\WindowsSandbox.exe**.
57
58
58
-
8. Enter **Windows Sandbox** into the **Application Name** field.
59
+
1. Enter **Windows Sandbox** into the **Application Name** field.
59
60
60
-
9. When you're done, select **Save**.
61
+
1. When you're done, select **Save**.
61
62
62
-
### [PowerShell](#tab/powershell)
63
+
### [Azure PowerShell](#tab/powershell)
63
64
64
65
To publish Windows Sandbox to your host pool using PowerShell:
65
66
66
67
1. Connect to Azure using one of the following methods:
67
-
68
+
68
69
- Open a PowerShell prompt on your local device. Run the `Connect-AzAccount` cmdlet to sign in to your Azure account. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
69
70
- Sign in to [the Azure portal](https://portal.azure.com/) and open [Azure Cloud Shell](../cloud-shell/overview.md) with PowerShell as the shell type.
70
71
71
-
2. Run the following cmdlet to get a list of all the Azure tenants your account has access to:
72
-
73
-
```powershell
72
+
1. Run the following cmdlet to get a list of all the Azure tenants your account has access to:
73
+
74
+
```azurepowershell-interactive
74
75
Get-AzTenant
75
76
```
76
77
77
78
When you see the tenant you want to sign in to, make a note of its name.
78
79
79
-
3. Run the following command to store the ID of the Azure tenant you want to connect to, replacing `"Fabrikam"` with your tenant name:
80
+
1. Run the following command to store the ID of the Azure tenant you want to connect to, replacing `"Fabrikam"` with your tenant name:
80
81
81
-
```powershell
82
-
$tenantId = (Get-AzTenant | ? Name -eq "Fabrikam").Id
82
+
```azurepowershell-interactive
83
+
$tenantId = (Get-AzTenant | Where-Object Name -eq Fabrikam).Id
83
84
```
84
85
85
-
4. Run the following command to list all subscriptions containing a host pool that are currently available to you:
86
-
87
-
```powershell
86
+
1. Run the following command to list all subscriptions containing a host pool that are currently available to you:
87
+
88
+
```azurepowershell-interactive
88
89
Get-AzSubscription -TenantId $tenantId
89
90
```
90
-
91
+
91
92
Find the name of the subscription that contains a host pool you want to assign a managed identity to in that list. Once you do, make a note of its name and ID.
92
93
93
-
5. Change your current Azure session to use the subscription you identified in the previous step, replacing the placeholder value `"<subscription name or id>"` with the name or ID of the subscription you want to use:
94
-
95
-
```powershell
96
-
Set-AzContext -Tenant $tenantId -Subscription "<subscription name or id>"
94
+
1. Change your current Azure session to use the subscription you identified in the previous step, replacing the placeholder value `<subscription name or id>` with the name or ID of the subscription you want to use:
95
+
96
+
```azurepowershell-interactive
97
+
Set-AzContext -Tenant $tenantId -Subscription <subscription name or id>
97
98
```
98
99
99
-
6. Run the following command to create a Sandbox remote app:
100
+
1. Run the following command to create a Sandbox remote app:
@@ -111,4 +112,4 @@ That's it! Leave the rest of the options default. You should now have Windows Sa
111
112
112
113
## Next steps
113
114
114
-
Learn more about sandboxes and how to use them to test Windows environments at [Windows Sandbox](/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview).
115
+
Learn more about sandboxes and how to use them to test Windows environments at [Windows Sandbox](/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview).
0 commit comments