@@ -62,6 +62,8 @@ New-AzRoleAssignment -SignInName <userupn> -RoleDefinitionName "Desktop Virtuali
62
62
63
63
Unlike automatic assignment, when you use direct assignment, you must assign the user to both the personal desktop host pool and a specific session host before they can connect to their personal desktop. If the user is only assigned to a host pool without a session host assignment, they won't be able to access resources and will see an error message that says, "No resources available."
64
64
65
+
66
+
65
67
To configure a host pool to require direct assignment of users to session hosts, run the following PowerShell cmdlet:
66
68
67
69
``` powershell
@@ -74,26 +76,33 @@ To assign a user to the personal desktop host pool, run the following PowerShell
74
76
New-AzRoleAssignment -SignInName <userupn> -RoleDefinitionName "Desktop Virtualization User" -ResourceName <appgroupname> -ResourceGroupName $resourceGroupName -ResourceType 'Microsoft.DesktopVirtualization/applicationGroups'
75
77
```
76
78
77
- To assign a user to a specific session host, run the following PowerShell cmdlet:
79
+ ### Directly assign users to session hosts
78
80
79
- ``` powershell
80
- Update-AzWvdSessionHost -HostPoolName $hostPoolName -Name $sessionHostName -ResourceGroupName $resourceGroupName -AssignedUser <userupn>
81
- ```
81
+ #### [ Azure portal] ( #tab/azure )
82
82
83
83
To directly assign a user to a session host in the Azure portal:
84
84
85
85
1 . Sign in to the [ Azure portal] ( https://portal.azure.com ) .
86
- 2 . Enter ** Azure Virtual Desktop** into the search bar.
87
- 3 . Under ** Services** , select ** Azure Virtual Desktop** .
88
- 4 . At the Azure Virtual Desktop page, go the menu on the left side of the window and select ** Host pools** .
89
- 5 . Select the host pool you want to assign users to.
90
- 6 . Next, go to the menu on the left side of the window and select ** Application groups** .
91
- 7 . Select the name of the app group you want to assign users to, then select ** Assignments** in the menu on the left side of the window.
92
- 8 . Select ** + Add** , then select the users or user groups you want to assign to this app group.
93
- 9 . Select ** Assign VM** in the Information bar to assign a session host to a user.
94
- 10 . Select the session host you want to assign to the user, then select ** Assign** . You can also select ** Assignment** > ** Assign user** .
95
- 11 . Select the user you want to assign the session host to from the list of available users.
96
- 12 . When you're done, select ** Select** .
86
+ 1 . Enter ** Azure Virtual Desktop** into the search bar.
87
+ 1 . Under ** Services** , select ** Azure Virtual Desktop** .
88
+ 1 . At the Azure Virtual Desktop page, go the menu on the left side of the window and select ** Host pools** .
89
+ 1 . Select the host pool you want to assign users to.
90
+ 1 . Next, go to the menu on the left side of the window and select ** Application groups** .
91
+ 1 . Select the name of the app group you want to assign users to, then select ** Assignments** in the menu on the left side of the window.
92
+ 1 . Select ** + Add** , then select the users or user groups you want to assign to this app group.
93
+ 1 . Select ** Assign VM** in the Information bar to assign a session host to a user.
94
+ 1 . Select the session host you want to assign to the user, then select ** Assign** . You can also select ** Assignment** > ** Assign user** .
95
+ 1 . Select the user you want to assign the session host to from the list of available users.
96
+ 1 . When you're done, select ** Select** .
97
+
98
+ #### [ PowerShell] ( #tab/azure )
99
+
100
+ To assign a user to a specific session host, run the following PowerShell cmdlet:
101
+
102
+ ``` powershell
103
+ Update-AzWvdSessionHost -HostPoolName $hostPoolName -Name $sessionHostName -ResourceGroupName $resourceGroupName -AssignedUser <userupn>
104
+ ```
105
+ ---
97
106
98
107
## Unassign a personal desktop
99
108
0 commit comments