Edit

Share via


Get-RDUserSession

Gets a list of all user sessions in a collection or in a Remote Desktop deployment.

Syntax

Default (Default)

Get-RDUserSession
    [[-CollectionName] <String[]>]
    [[-ConnectionBroker] <String>]
    [<CommonParameters>]

Description

The Get-RDUserSession cmdlet gets a list of all user sessions in a collection or in a Remote Desktop deployment.

Examples

Example 1: Retrieve a list of user sessions in a collection

PS C:\> Get-RDUserSession -ConnectionBroker "rdcb.contoso.com"

This command lists user sessions in a collection that is associated with the RD Connection Broker server named rdcb.contoso.com.

Example 2: Retrieve a list of user sessions in multiple collections

PS C:\> Get-RDUserSession -ConnectionBroker "rdcb.contoso.com" -CollectionName @("Session Collection","Virtual Desktop Collection")

This command lists user sessions in the collections named Session Collection and Virtual Desktop Collection. The cmdlet associates these collections with the RD Connection Broker server named rdcb.contoso.com.

Parameters

-CollectionName

Specifies an array that contains the name of the virtual desktop collection that contains the user sessions. If this parameter does not appear, the cmdlet returns all user sessions across all virtual desktop collections.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ConnectionBroker

Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for this Remote Desktop deployment. Remote users connect to this server to obtain views of available firstref_server_7 RemoteApp programs, session-based desktops, and virtual desktops. If this parameter does not appear, the default value is the fully qualified domain name (FQDN) of the local host.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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.

Outputs

Microsoft.RemoteDesktopServices.Management.RDUserSession