Skip to content

Commit 09d8e3f

Browse files
committed
Updated PowerShell page.
1 parent db89d4c commit 09d8e3f

File tree

1 file changed

+38
-17
lines changed

1 file changed

+38
-17
lines changed

articles/virtual-desktop/manage-app-groups-powershell.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ services: virtual-desktop
55
author: Heidilohr
66

77
ms.service: virtual-desktop
8-
ms.topic: tutorial
8+
ms.topic: conceptual
99
ms.date: 04/30/2020
1010
ms.author: helohr
1111
manager: lizross
1212
---
13-
# Tutorial: Manage app groups using PowerShell
13+
# Manage app groups using PowerShell
1414

1515
>[!IMPORTANT]
1616
>This content applies to the Spring 2020 update with Azure Resource Manager Windows Virtual Desktop objects. If you're using the Windows Virtual Desktop Fall 2019 release without Azure Resource Manager objects, see [this article](./virtual-desktop-fall-2019/manage-app-groups-2019.md).
@@ -26,60 +26,81 @@ In this tutorial, learn how to:
2626
> * Create a RemoteApp group.
2727
> * Grant access to RemoteApp programs.
2828
29-
Before you begin, [download and import the Windows Virtual Desktop PowerShell module](/powershell/windows-virtual-desktop/overview/) to use in your PowerShell session if you haven't already. After that, run the following cmdlet to sign in to your account:
29+
## Prerequisites
3030

31-
```powershell
32-
Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
33-
```
31+
This article assumes you've followed the instructions in [Set up the PowerShell module](powershell-module.md) to set up your PowerShell module and sign in to your Azure account.
3432

3533
## Create a RemoteApp group
3634

35+
To create a RemoteApp group with PowerShell:
36+
3737
1. Run the following PowerShell cmdlet to create a new empty RemoteApp app group.
3838

3939
```powershell
40-
New-RdsAppGroup <tenantname> <hostpoolname> <appgroupname> -ResourceType "RemoteApp"
40+
New-AzWvdApplicationGroup -Name <appgroupname> -ResourceGroupName <resourcegroupname> -ApplicationGroupType "RemoteApp" -HostPoolArmPath '/subscriptions/SubscriptionId/resourcegroups/ResourceGroupName/providers/Microsoft.DesktopVirtualization/hostPools/HostPoolName'-Location <azureregion>
4141
```
4242

4343
2. (Optional) To verify that the app group was created, you can run the following cmdlet to see a list of all app groups for the host pool.
4444

4545
```powershell
46-
Get-RdsAppGroup <tenantname> <hostpoolname>
46+
Get-AzWvdApplicationGroup -Name <appgroupname> -ResourceGroupName <resourcegroupname>
4747
```
4848

4949
3. Run the following cmdlet to get a list of **Start** menu apps on the host pool's virtual machine image. Write down the values for **FilePath**, **IconPath**, **IconIndex**, and other important information for the application that you want to publish.
5050

5151
```powershell
52-
Get-RdsStartMenuApp <tenantname> <hostpoolname> <appgroupname>
52+
Get-AzWvdStartMenuItem -ApplicationGroupName <appgroupname> -ResourceGroupName <resourcegroupname> | Format-List | more
53+
```
54+
55+
The output should show all the Start menu items in a format like this:
56+
57+
```powershell
58+
AppAlias : access
59+
CommandLineArgument :
60+
FilePath : C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE
61+
FriendlyName :
62+
IconIndex : 0
63+
IconPath : C:\Program Files\Microsoft Office\Root\VFS\Windows\Installer\{90160000-000F-0000-1000-0000000FF1CE}\accicons.exe
64+
Id : /subscriptions/beec440d-0623-4cf1-8237-e1cb4a9bcba7<sub id>/resourcegroups/0301RG/providers/Microsoft.DesktopVirtualization/applicationgroups/0301RAG/startmenuitems/Access
65+
Name : 0301RAG/Access
66+
Type : Microsoft.DesktopVirtualization/applicationgroups/startmenuitems
67+
68+
AppAlias : charactermap
69+
CommandLineArgument :
70+
FilePath : C:\windows\system32\charmap.exe
71+
FriendlyName :
72+
IconIndex : 0
73+
IconPath : C:\windows\system32\charmap.exe
74+
Id : /subscriptions/beec440d-0623-4cf1-8237-e1cb4a9bcba7<sub id>/resourcegroups/0301RG/providers/Microsoft.DesktopVirtualization/applicationgroups/0301RAG/startmenuitems/Character Map
75+
Name : 0301RAG/Character Map
76+
Type : Microsoft.DesktopVirtualization/applicationgroups/startmenuitems
5377
```
5478

5579
4. Run the following cmdlet to install the application based on `AppAlias`. `AppAlias` becomes visible when you run the output from step 3.
5680

5781
```powershell
58-
New-RdsRemoteApp <tenantname> <hostpoolname> <appgroupname> -Name <remoteappname> -AppAlias <appalias>
82+
New-AzWvdApplication -AppAlias <appalias> -GroupName <appgroupname> -Name <remoteappname> -ResourceGroupName <resourcegroupname> -CommandLineSetting <DoNotAllow|Allow|Require>
5983
```
6084

6185
5. (Optional) Run the following cmdlet to publish a new RemoteApp program to the application group created in step 1.
6286

6387
```powershell
64-
New-RdsRemoteApp <tenantname> <hostpoolname> <appgroupname> -Name <remoteappname> -Filepath <filepath> -IconPath <iconpath> -IconIndex <iconindex>
88+
New-AzWvdApplication -GroupName <appgroupname> -Name <remoteappname> -ResourceGroupName <resourcegroupname> -Filepath <filepath> -IconPath <iconpath> -IconIndex <iconindex> -CommandLineSetting <DoNotAllow|Allow|Require>
6589
```
6690

6791
6. To verify that the app was published, run the following cmdlet.
6892

6993
```powershell
70-
Get-RdsRemoteApp <tenantname> <hostpoolname> <appgroupname>
94+
Get-AzWvdApplication -GroupName <appgroupname> -ResourceGroupName <resourcegroupname>
7195
```
7296

7397
7. Repeat steps 1–5 for each application that you want to publish for this app group.
7498
8. Run the following cmdlet to grant users access to the RemoteApp programs in the app group.
7599

76100
```powershell
77-
Add-RdsAppGroupUser <tenantname> <hostpoolname> <appgroupname> -UserPrincipalName <userupn>
101+
New-AzRoleAssignment -SignInName <userupn> -RoleDefinitionName "Desktop Virtualization User" -ResourceName <appgroupname> -ResourceGroupName <resourcegroupname> -ResourceType 'Microsoft.DesktopVirtualization/applicationGroups'
78102
```
79103

80104
## Next steps
81105

82-
In this tutorial, you learned how to create an app group, populate it with RemoteApp programs, and assign users to the app group. To learn how to create a validation host pool, see the following tutorial. You can use a validation host pool to monitor service updates before rolling them out to your production environment.
83-
84-
> [!div class="nextstepaction"]
85-
> [Create a host pool to validate service updates](./create-validation-host-pool.md)
106+
If you came to this How-to guide from our tutorials, check out [Create a host pool to validate service updates](create-validation-host-pool.md). You can use a validation host pool to monitor service updates before rolling them out to your production environment.

0 commit comments

Comments
 (0)