Get-RDUserSession
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.
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.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Microsoft.RemoteDesktopServices.Management.RDUserSession
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈