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
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
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
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
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
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
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
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.
Parameter properties
Type:
PersonalDesktopAssignmentType
Default value:
None
Accepted values:
Automatic, Direct
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP5
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP3
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP6
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
The description for the host pool.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP4
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-FriendlyName
The friendly name of the host pool to be displayed.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP4
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HP4
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
HP5
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
The name of the host pool.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
HostPoolName
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-TenantName
The name of the tenant.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.