< Back
Get-RDUserSession
Post
NAME Get-RDUserSession
SYNOPSIS
Gets a list of all user sessions in a collection or in a Remote Desktop deployment.
SYNTAX
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.
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.
Required? false
Position? 1
Default value none
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConnectionBroker [<String>]
Specifies the Remote Desktop Connection Broker (RDConnection 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.
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Microsoft.RemoteDesktopServices.Management.RDUserSession
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.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=294224
SYNOPSIS
Gets a list of all user sessions in a collection or in a Remote Desktop deployment.
SYNTAX
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.
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.
Required? false
Position? 1
Default value none
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConnectionBroker [<String>]
Specifies the Remote Desktop Connection Broker (RDConnection 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.
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Microsoft.RemoteDesktopServices.Management.RDUserSession
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.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=294224