|
| 1 | +--- |
| 2 | +title: Windows Virtual Desktop personal desktop assignment type - Azure |
| 3 | +description: How to configure the assignment type for a Windows Virtual Desktop personal desktop host pool. |
| 4 | +services: virtual-desktop |
| 5 | +author: HeidiLohr |
| 6 | + |
| 7 | +ms.service: virtual-desktop |
| 8 | +ms.topic: conceptual |
| 9 | +ms.date: 12/10/2019 |
| 10 | +ms.author: helohr |
| 11 | +--- |
| 12 | +# Configure the personal desktop host pool assignment type |
| 13 | + |
| 14 | +You can configure the assignment type of your personal desktop host pool to adjust your Windows 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 | + |
| 16 | +>[!NOTE] |
| 17 | +> 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. |
| 18 | +
|
| 19 | +## Configure automatic assignment |
| 20 | + |
| 21 | +Automatic assignment is the default assignment type for new personal desktop host pools created in your Windows Virtual Desktop environment. Automatically assigning users doesn't require a specific session host. |
| 22 | + |
| 23 | +To automatically assign users, first assign them to the personal desktop host pool so that they can see the desktop in their feed. When an assigned user launches the desktop in their feed, they will claim an available session host if they have not already connected to the host pool, which completes the assignment process. |
| 24 | + |
| 25 | +Before you start, [download and import the Windows Virtual Desktop PowerShell module](https://docs.microsoft.com/powershell/windows-virtual-desktop/overview) if you haven't already. |
| 26 | + |
| 27 | +> [!NOTE] |
| 28 | +> Make sure you've installed Windows Virtual Desktop PowerShell module version 1.0.1534.2001 or later before following these instructions. |
| 29 | +
|
| 30 | +After that, run the following cmdlet to sign in to your account: |
| 31 | + |
| 32 | +```powershell |
| 33 | +Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com" |
| 34 | +``` |
| 35 | + |
| 36 | +To configure a host pool to automatically assign users to VMs, run the following PowerShell cmdlet: |
| 37 | + |
| 38 | +```powershell |
| 39 | +Set-RdsHostPool <tenantname> <hostpoolname> -AssignmentType Automatic |
| 40 | +``` |
| 41 | + |
| 42 | +To assign a user to the personal desktop host pool, run the following PowerShell cmdlet: |
| 43 | + |
| 44 | +```powershell |
| 45 | +Add-RdsAppGroupUser <tenantname> <hostpoolname> "Desktop Application Group" -UserPrincipalName <userupn> |
| 46 | +``` |
| 47 | + |
| 48 | +## Configure direct assignment |
| 49 | + |
| 50 | +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. |
| 51 | + |
| 52 | +To configure a host pool to require direct assignment of users to session hosts, run the following PowerShell cmdlet: |
| 53 | + |
| 54 | +```powershell |
| 55 | +Set-RdsHostPool <tenantname> <hostpoolname> -AssignmentType Direct |
| 56 | +``` |
| 57 | + |
| 58 | +To assign a user to the personal desktop host pool, run the following PowerShell cmdlet: |
| 59 | + |
| 60 | +```powershell |
| 61 | +Add-RdsAppGroupUser <tenantname> <hostpoolname> "Desktop Application Group" -UserPrincipalName <userupn> |
| 62 | +``` |
| 63 | + |
| 64 | +To assign a user to a specific session host, run the following PowerShell cmdlet: |
| 65 | + |
| 66 | +```powershell |
| 67 | +Set-RdsSessionHost <tenantname> <hostpoolname> -Name <sessionhostname> -AssignedUser <userupn> |
| 68 | +``` |
0 commit comments