Export (0) Print
Expand All
Expand Minimize

Get-RDUserSession

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-RDUserSession

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

Syntax

Parameter Set: Default
Get-RDUserSession [[-CollectionName] <String[]> ] [[-ConnectionBroker] <String> ] [ <CommonParameters>]




Detailed Description

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

Parameters

-CollectionName<String[]>

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.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ConnectionBroker<String>

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 Windows Server® 2008 R2 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.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.RemoteDesktopServices.Management.RDUserSession

Examples

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

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


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

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

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.


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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft