Skip to content

Commit bee0751

Browse files
authored
Merge pull request #229712 from mikefrobbins/mr-azps-68814
Best practice and styling corrections
2 parents a547aee + cc1df4f commit bee0751

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

articles/virtual-desktop/sandbox.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title: Azure Virtual Desktop Sandbox - Azure
33
description: How to set up Windows Sandbox for Azure Virtual Desktop.
44
author: Heidilohr
55
ms.topic: how-to
6-
ms.date: 07/29/2022
6+
ms.date: 03/07/2023
77
ms.author: helohr
88
manager: femila
9+
ms.custom: devx-track-azurepowershell
910
---
1011

1112
# Set up Windows Sandbox in Azure Virtual Desktop
@@ -43,63 +44,63 @@ To publish Windows Sandbox to your host pool:
4344

4445
1. Sign in to the Azure portal.
4546

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.
4748

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.
4950

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.
5152

52-
5. Select **+ Add** to open the **Add application** tab.
53+
1. Select **+ Add** to open the **Add application** tab.
5354

54-
6. For **Application source**, select **File Path**.
55+
1. For **Application source**, select **File Path**.
5556

56-
7. For **Application path**, enter **C:\windows\system32\WindowsSandbox.exe**.
57+
1. For **Application path**, enter **C:\windows\system32\WindowsSandbox.exe**.
5758

58-
8. Enter **Windows Sandbox** into the **Application Name** field.
59+
1. Enter **Windows Sandbox** into the **Application Name** field.
5960

60-
9. When you're done, select **Save**.
61+
1. When you're done, select **Save**.
6162

62-
### [PowerShell](#tab/powershell)
63+
### [Azure PowerShell](#tab/powershell)
6364

6465
To publish Windows Sandbox to your host pool using PowerShell:
6566

6667
1. Connect to Azure using one of the following methods:
67-
68+
6869
- 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).
6970
- 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.
7071

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
7475
Get-AzTenant
7576
```
7677

7778
When you see the tenant you want to sign in to, make a note of its name.
7879

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:
8081

81-
```powershell
82-
$tenantId = (Get-AzTenant | ? Name -eq "Fabrikam").Id
82+
```azurepowershell-interactive
83+
$tenantId = (Get-AzTenant | Where-Object Name -eq Fabrikam).Id
8384
```
8485

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
8889
Get-AzSubscription -TenantId $tenantId
8990
```
90-
91+
9192
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.
9293

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>
9798
```
9899

99-
6. Run the following command to create a Sandbox remote app:
100+
1. Run the following command to create a Sandbox remote app:
100101

101-
```powershell
102-
New-AzWvdApplication -ResourceGroupName <Resource Group Name> -GroupName <Application Group Name> -FilePath 'C:\windows\system32\WindowsSandbox.exe' -IconIndex 0 -IconPath 'C:\windows\system32\WindowsSandbox.exe' -CommandLineSetting 'Allow' -ShowInPortal:$true -SubscriptionId <Workspace Subscription ID>
102+
```azurepowershell-interactive
103+
New-AzWvdApplication -ResourceGroupName <Resource Group Name> -GroupName <Application Group Name> -FilePath C:\windows\system32\WindowsSandbox.exe -IconIndex 0 -IconPath C:\windows\system32\WindowsSandbox.exe -CommandLineSetting 'Allow' -ShowInPortal:$true -SubscriptionId <Workspace Subscription ID>
103104
```
104105

105106
>[!NOTE]
@@ -111,4 +112,4 @@ That's it! Leave the rest of the options default. You should now have Windows Sa
111112

112113
## Next steps
113114

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

Comments
 (0)