Get-RdsUserSession
Lists all active user sessions in a host pool.
Syntax
Default (Default)
Get-RdsUserSession
[-TenantName] <String>
[-HostPoolName] <String>
[<CommonParameters>]
Description
The Get-RdsUserSession lists all user sessions running on the session hosts in the specified host pool.
With this command, you can identify the session host name and session ID associated with a specific user. You can then run the Disconnect-RdsUserSession, Invoke-RdsUserSessionLogoff or Send-RdsUserSessionMessage with this additional information.
Examples
Example 1: List all user sessions running in a host pool
PS C:\> Get-RdsUserSession -TenantName "contoso" -HostPoolName "contosoHostPool"
This command lists all user sessions running on the session hosts in the specified host pool.
Parameters
-HostPoolName
The name of the host pool.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
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 |
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.