Set-RdsHostPool

Sets the properties for a host pool.

Syntax

Set-RdsHostPool
   [-TenantName] <String>
   [-Name] <String>
   [-FriendlyName <String>]
   [-Description <String>]
   [-MaxSessionLimit <Int32>]
   [-ValidationEnv <bool>]
   [-AssignmentType {Automatic | Direct}]
   [<CommonParameters>]
Set-RdsHostPool
   [-TenantName] <String>
   [-Name] <String>
   [-BreadthFirstLoadBalancer]
   [-MaxSessionLimit <Int32>]
   [-ValidationEnv <bool>]
   [-AssignmentType {Automatic | Direct}]
   [<CommonParameters>]
Set-RdsHostPool
   [-TenantName] <String>
   [-Name] <String>
   [-DepthFirstLoadBalancer]
   -MaxSessionLimit <Int32>
   [-ValidationEnv <bool>]
    [-AssignmentType {Automatic | Direct}]
   [<CommonParameters>]
Set-RdsHostPool
   [-TenantName] <String>
   [-Name] <String>
   [-CustomRdpProperty <String>]
   [-ValidationEnv <bool>]
   [-AssignmentType {Automatic | Direct}]
   [<CommonParameters>]
Set-RdsHostPool
   [-TenantName] <String>
   [-Name] <String>
   [-ValidationEnv <bool>]
   [-Ring <int>]
   [-AssignmentType {Automatic | Direct}]
   [<CommonParameters>]

Description

The Set-RdsHostPool cmdlet sets the properties for the specified host pool. Three parameter sets exist for this cmdlet. First is used to disable user profile disks. The second is used to enable user profile disks. The third is used to set all other properties of the host pool.

Examples

Example 1: Set the host pool to use depth-first load balancing

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoHostPool" -DepthFirstLoadBalancer -MaxSessionLimit 10

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoHostPool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     :
MaxSessionLimit       : 10
LoadBalancerType      : DepthFirst
ValidationEnv         : False
Ring                  : 
AssignmentType        :

This command sets the host pool to use depth-first load balancing, such that incoming users will all be directed to a specific session host until it reaches the MaxSessionLimit, which is specified as 10 in this example. The MaxSessionLimit parameter is a requirement when setting depth-first load balancing since connections will not be distributed to subsequent session hosts until this session limit is reached on the first session host.

Example 2: Set the host pool to use breadth-first load balancing

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoHostPool" -BreadthFirstLoadBalancer

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoHostPool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     :
MaxSessionLimit       : 10
LoadBalancerType      : BreadthFirst
ValidationEnv         : False
Ring                  : 
AssignmentType        :

This command sets the host pool to use breadth-first load balancing, such that incoming users will be evenly directed across session hosts in the host pool. The MaxSessionLimit parameter is optional since load balancing in breadth-first mode is less restrictive than load balancing in depth-first mode.

Example 3: Set the host pool to be treated as a validation environment

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoHostPool" -ValidationEnv $true

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoHostPool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     : use multimon:i:0;
MaxSessionLimit       : 10
LoadBalancerType      : BreadthFirst
ValidationEnv         : True
Ring                  : 
AssignmentType        :

This command sets the host pool to be a validation host pool. The validation host pool will receive service updates at a faster cadence, allowing you to test any service changes before they are deployed broadly in production.

Example 4: Set the host pool to use direct assignment

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoPersonalDesktops" -AssignmentType Direct

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoPersonalDesktops
FriendlyName          :
Description           :
Persistent            : True
CustomRdpProperty     : 
MaxSessionLimit       : 999999
LoadBalancerType      : Persistent
ValidationEnv         : False
Ring                  : 
AssignmentType        : Direct

This command sets the host pool to use direct assignment to determine the personal desktop session host to assign the user. With direct assignment, the user must be assigned to a session host before connecting to the host pool.

Example 5: Set the host pool to use automatic assignment

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoPersonalDesktops" -AssignmentType Automatic

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoPersonalDesktops
FriendlyName          :
Description           :
Persistent            : True
CustomRdpProperty     : 
MaxSessionLimit       : 999999
LoadBalancerType      : Persistent
ValidationEnv         : False
Ring                  : 
AssignmentType        : Automatic

This command sets the host pool to use automatic assignment to determine the personal desktop session host to assign the user. With automatic assignment, the user does not need to be assigned to a session host before connecting to the host pool.

Example 4: Set the host pool to use direct assignment

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoPersonalDesktops" -AssignmentType Direct

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoPersonalDesktops
FriendlyName          :
Description           :
Persistent            : True
CustomRdpProperty     : 
MaxSessionLimit       : 999999
LoadBalancerType      : Persistent
ValidationEnv         : False
Ring                  : 
AssignmentType        : Direct

This command sets the host pool to use direct assignment to determine the personal desktop session host to assign the user. With direct assignment, the user must be assigned to a session host before connecting to the host pool.

Example 5: Set the host pool to use automatic assignment

PS C:\> Set-RdsHostPool -TenantName "contoso" -Name "contosoPersonalDesktops" -AssignmentType Automatic

TenantName            : contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : contosoPersonalDesktops
FriendlyName          :
Description           :
Persistent            : True
CustomRdpProperty     : 
MaxSessionLimit       : 999999
LoadBalancerType      : Persistent
ValidationEnv         : False
Ring                  : 
AssignmentType        : Automatic

This command sets the host pool to use automatic assignment to determine the personal desktop session host to assign the user. With automatic assignment, the user does not need to be assigned to a session host before connecting to the host pool.

Parameters

-AssignmentType

The assignment type for the personal desktop host pool:

  • Automatic, meaning users will be automatically assigned a session host on their first connection to the host pool.
  • Direct, meaning users must be directly assigned to a session host in the pool before they can connect.
Type:PersonalDesktopAssignmentType
Accepted values:Automatic, Direct
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BreadthFirstLoadBalancer

Switch to enable the use of breadth-first load balancing for the host pool. Breadth-first indicates that new user sessions are directed to the session host with the least number of user sessions.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomRdpProperty

Specifies Remote Desktop Protocol (RDP) settings to include in the .rdp files for all RemoteApp programs and remote desktops published in this collection. See supported Remote Desktop RDP file settings for more information.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DepthFirstLoadBalancer

Switch to enable the use of depth-first load balancing for the host pool. Depth-first indicates that new user sessions are directed to the session host with the highest number of user sessions that has not already reached its max session limit.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Description

The description for the host pool.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FriendlyName

The friendly name of the host pool to be displayed.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaxSessionLimit

The maximum number of sessions allowed per session host in the host pool. When depth-first mode is set for load-balancing, this value is used to determine when to stop load balancing users to one host and to begin sending users to the next host.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the host pool.

Type:String
Aliases:HostPoolName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TenantName

The name of the tenant.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ValidationEnv

A boolean indicating if the host pool should be treated as a validation host pool. Validation host pools receive service updates at a faster cadence than non-validation host pools, allowing you to test service changes before they are deployed broadly to production.

Type:String
Position:Named
Default value:False
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtHostPool