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
>This content applies to Azure Virtual Desktop with Azure Resource Manager Azure Virtual Desktop objects. If you're using Azure Virtual Desktop (classic) without Azure Resource Manager objects, see [this article](./virtual-desktop-fall-2019/configure-host-pool-personal-desktop-assignment-type-2019.md).
14
14
15
-
You can configure the assignment type of your personal desktop host pool to adjust your Azure Virtual Desktop environment to better suit your needs. In this topic, we'll show you how to configure automatic or direct assignment for your users.
15
+
A personal host pool is a type of host pool that has personal desktops. Personal desktops have one-to-one mapping, which means a single user can only be assigned to a single personal desktop. Every time the user signs in, their user session is directed to their assigned personal desktop session host. This host pool type is ideal for customers with resource-intensive workloads because user experience and session performance will improve if there's only one session on the session host. Another benefit of this host pool type is that user activities, files, and settings persist on the virtual machine operating system (VM OS) disk after the user signs out.
16
+
17
+
Users must be assigned to a personal desktop to start their session. You can configure the assignment type of your personal desktop host pool to adjust your Azure Virtual Desktop environment to better suit your needs. In this topic, we'll show you how to configure automatic or direct assignment for your users.
16
18
17
19
>[!NOTE]
18
20
> The instructions in this article only apply to personal desktop host pools, not pooled host pools, since users in pooled host pools aren't assigned to specific session hosts.
@@ -27,24 +29,6 @@ If you're using either the Azure portal or PowerShell method, you'll need the fo
27
29
28
30
If you're assigning desktops with PowerShell, you'll need to [download and install the Azure Virtual Desktop PowerShell module](powershell-module.md) if you haven't already.
29
31
30
-
### Define variables
31
-
32
-
The PowerShell commands listed in this article require defining the following variables with the placeholder values replaced with the values relevant to your account and deployment:
A personal host pool is a type of host pool that has personal desktops. Personal desktops have one-to-one mapping, which means a single user can only be assigned to a single personal desktop. Every time the user signs in, their user session is directed to their assigned personal desktop session host. This host pool type is ideal for customers with resource-intensive workloads because user experience and session performance will improve if there's only one session on the session host. Another benefit of this host pool type is that user activities, files, and settings persist on the virtual machine operating system (VM OS) disk after the user signs out.
45
-
46
-
Users must be assigned to a personal desktop to start their session. There are two types of assignments in a personal host pool: automatic assignment and direct assignment.
47
-
48
32
## Configure automatic assignment
49
33
50
34
Automatic assignment assigns users a personal desktop the first time they connect. It's the default assignment type for new personal desktop host pools you create in your Azure Virtual Desktop environment. Automatically assigning users doesn't require a specific session host.
@@ -69,14 +53,29 @@ To configure automatic assignment in the Azure portal:
69
53
70
54
Here's how to configure a host pool to automatically assign users to VMs using the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module.
2. Run the `Update-AzWvdHostPool` command in the following example to configure a host pool to automatically assign users to VMs. For more information about the parameters,see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
Here's how to configure a host pool to automatically assign users to VMs using the [az-desktopvirtualization-hostpool-update](/cli/azure/desktopvirtualization/hostpool#az-desktopvirtualization-hostpool-update) command.
2. Run the command in the following example to configure a host pool to automatically assign users to VMs. For more information about the parameters, see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
71
+
72
+
```azurecli
73
+
az desktopvirtualization hostpool update \
74
+
--resource-group $resourceGroupName \
75
+
--name $hostPoolName \
76
+
--personal-desktop-assignment-type Automatic
77
+
```
78
+
80
79
---
81
80
82
81
## Configure direct assignment
@@ -101,19 +100,36 @@ To configure direct assignment in the Azure portal:
101
100
102
101
Here's how to configure a host pool to require direct assignment of users to session hosts using the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module.
2. Run the `Update-AzWvdHostPool` command in the following example to configure a host pool to require direct assignment. For more information about the parameters,see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
105
+
2. Run the `Update-AzWvdHostPool` command in the following example to configure a host pool to require direct assignment. For more information about the parameters,see the [Update-AzWvdHostPool](/powershell/module/az.desktopvirtualization/update-azwvdhostpool) reference.
107
106
108
107
```powershell
109
108
Update-AzWvdHostPool -ResourceGroupName $resourceGroupName -Name $hostPoolName -PersonalDesktopAssignmentType Direct
110
109
```
111
110
111
+
#### [Azure CLI](#tab/cli)
112
+
113
+
Here's how to configure a host pool to automatically assign users to VMs using the [az-desktopvirtualization-hostpool-update](/cli/azure/desktopvirtualization/hostpool#az-desktopvirtualization-hostpool-update) command.
2. Run the command in the following example to configure a host pool to automatically assign users to VMs. For more information about the parameters, see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
118
+
119
+
```azurecli
120
+
az desktopvirtualization hostpool update \
121
+
--resource-group $resourceGroupName \
122
+
--name $hostPoolName \
123
+
--personal-desktop-assignment-type Direct
124
+
```
125
+
112
126
---
113
127
114
128
### Directly assign users to session hosts
115
129
116
-
#### [Azure portal](#tab/azure)
130
+
Here's how to directly assign users to session hosts using the Azure portal or PowerShell. You can't assign users to session hosts using Azure CLI.
131
+
132
+
#### [Azure portal](#tab/azure2)
117
133
118
134
To directly assign a user to a session host in the Azure portal:
119
135
@@ -141,22 +157,26 @@ To directly assign a user to a session host in the Azure portal:
141
157
142
158
1. When you're done, select **Select**.
143
159
144
-
#### [PowerShell](#tab/powershell)
160
+
#### [PowerShell](#tab/powershell2)
145
161
146
162
Here's how to configure a host pool to assign a user to a specific session host using the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module.
2. Run the `Update-AzWvdHostPool` command in the following example to assign a user to a session host. For more information about the parameters,see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
166
+
2. Run the `Update-AzWvdHostPool` command in the following example to assign a user to a session host. For more information about the parameters,see the [Update-AzWvdHostPool](/powershell/module/az.desktopvirtualization/update-azwvdhostpool) reference.
Here's how to unassign a personal desktop using the Azure portal or PowerShell. You can't unassign a personal desktop using Azure CLI.
178
+
179
+
#### [Azure portal](#tab/azure2)
160
180
161
181
To unassign a personal desktop in the Azure portal:
162
182
@@ -182,13 +202,13 @@ To unassign a personal desktop in the Azure portal:
182
202
183
203
1. Select **Unassign** when prompted with the warning.
184
204
185
-
#### [PowerShell](#tab/powershell)
205
+
#### [PowerShell](#tab/powershell2)
186
206
187
207
Here's how to configure a host pool to unassign a personal desktop using the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module.
2. Run the `Invoke-AzRestMethod` command in the following example to unassign a personal desktop. For more information about the parameters,see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
211
+
2. Run the `Invoke-AzRestMethod` command in the following example to unassign a personal desktop. For more information about the parameters,see the [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) reference.
192
212
193
213
```powershell
194
214
$unassignDesktopParams = @{
@@ -201,11 +221,15 @@ Here's how to configure a host pool to unassign a personal desktop using the [Az
201
221
}
202
222
Invoke-AzRestMethod @unassignDesktopParams
203
223
```
224
+
225
+
204
226
---
205
227
206
228
## Reassign a personal desktop
207
229
208
-
#### [Azure portal](#tab/azure)
230
+
Here's how to reassign a personal desktop using the Azure portal or PowerShell. You can't reassign a personal desktop using Azure CLI.
231
+
232
+
#### [Azure portal](#tab/azure2)
209
233
210
234
To reassign a personal desktop in the Azure portal:
211
235
@@ -232,19 +256,19 @@ To reassign a personal desktop in the Azure portal:
232
256
233
257
1. When you're done, select **Select**.
234
258
235
-
#### [PowerShell](#tab/powershell)
259
+
#### [PowerShell](#tab/powershell2)
236
260
237
261
Here's how to reassign a personal desktop using the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module.
2. Run the following command to define the `$reassignUserUpn` variable by running the following command:
242
266
243
267
```powershell
244
268
$reassignUserUpn = <UPN of user you are reassigning the desktop to>
245
269
```
246
270
247
-
3. Run the `Invoke-AzRestMethod` command in the following example to reassign a personal desktop. For more information about the parameters,see the [az-desktopvirtualization-hostpool Azure CLI reference](/cli/azure/desktopvirtualization/hostpool).
271
+
3. Run the `Invoke-AzRestMethod` command in the following example to reassign a personal desktop. For more information about the parameters,see the [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) reference.
248
272
249
273
```powershell
250
274
$reassignDesktopParams = @{
@@ -258,42 +282,15 @@ Here's how to reassign a personal desktop using the [Az.DesktopVirtualization](/
258
282
Invoke-AzRestMethod @reassignDesktopParams
259
283
```
260
284
285
+
261
286
---
262
287
263
288
## Give session hosts in a personal host pool a friendly name
264
289
265
-
You can give personal desktops you create *friendly names* to help users distinguish them in their feeds. You need a [REST API](/rest/api/desktopvirtualization/session-hosts/update?tabs=HTTP) to configure the friendly name.
266
-
267
-
Run the following command in PowerShell to use the REST API to give your session host a friendly name:
The Azure portal doesn't currently have a way to give session host friendly names.
283
-
284
-
### Get the session host friendly name
285
-
286
-
To get the session host friendly name, run the following command in PowerShell:
290
+
You can give personal desktops you create *friendly names* to help users distinguish them in their feeds using PowerShell. The Azure portal or Azure CLI doesn't currently have a way to give session host friendly names.
description: How to customize feed for Azure Virtual Desktop users with PowerShell cmdlets.
4
4
author: Heidilohr
5
5
ms.topic: how-to
6
-
ms.date: 08/16/2020
6
+
ms.date: 02/01/2024
7
7
ms.author: helohr
8
8
ms.custom: devx-track-azurepowershell
9
9
---
@@ -25,7 +25,8 @@ You can change the display name for a remote desktop for your users by setting i
25
25
>[!NOTE]
26
26
>The following instructions only apply to personal desktops, not pooled desktops. Also, personal host pools only allow and support desktop application groups.
27
27
28
-
To add or change a session host's friendly name, use the [Session Host - Update REST API](/rest/api/desktopvirtualization/session-hosts/update?tabs=HTTP) and update the *properties.friendlyName* parameter with a REST API request.
0 commit comments