Edit

Share via


Get-RdsUserSession

Lists all active user sessions in a host pool.

Syntax

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.

Type:String
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

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtUserSession