Citrix Virtual Apps and Desktops SDK

Group-BrokerSession

Groups and counts sessions with the same value for a specified property.

Syntax

Group-BrokerSession
     [[-SessionKey] <Guid>]
     [-AgentVersion <String>]
     [-AnonymousUserId <String>]
     [-ApplicationInUse <String>]
     [-AppState <SessionAppState>]
     [-AppStateLastChangeTime <DateTime>]
     [-AutonomouslyBrokered <Boolean>]
     [-BrokeringDuration <Int32>]
     [-BrokeringTime <DateTime>]
     [-BrokeringUserName <String>]
     [-BrokeringUserSID <String>]
     [-CatalogName <String>]
     [-CbpVersion <CBPVersion>]
     [-ClientAddress <String>]
     [-ClientName <String>]
     [-ClientPlatform <String>]
     [-ClientProductId <Int32>]
     [-ClientVersion <String>]
     [-ConnectedViaHostName <String>]
     [-ConnectedViaIP <String>]
     [-ConnectionMode <ConnectionMode>]
     [-ControllerDNSName <String>]
     [-DesktopGroupName <String>]
     [-DesktopGroupUid <Int32>]
     [-DesktopKind <DesktopKind>]
     [-DesktopSID <String>]
     [-DesktopUid <Int32>]
     [-DeviceId <String>]
     [-DNSName <String>]
     [-EntitlementPolicyRuleUid <Int32>]
     [-EstablishmentDuration <Int32>]
     [-EstablishmentTime <DateTime>]
     [-HardwareId <String>]
     [-Hidden <Boolean>]
     [-HostedMachineName <String>]
     [-HostingServerName <String>]
     [-HypervisorConnectionName <String>]
     [-IdleDuration <TimeSpan>]
     [-IdleSince <DateTime>]
     [-ImageOutOfDate <Boolean>]
     [-InMaintenanceMode <Boolean>]
     [-IPAddress <String>]
     [-IsAnonymousUser <Boolean>]
     [-IsPhysical <Boolean>]
     [-LaunchedViaHostName <String>]
     [-LaunchedViaIP <String>]
     [-LaunchedViaPublishedName <String>]
     [-LaunchedViaWorkspace <Boolean>]
     [-LogoffInProgress <Boolean>]
     [-LogonInProgress <Boolean>]
     [-MachineName <String>]
     [-MachineSummaryState <DesktopSummaryState>]
     [-MachineUid <Int32>]
     [-Metadata <String>]
     [-OSType <String>]
     [-PersistUserChanges <PersistUserChanges>]
     [-PowerState <PowerState>]
     [-PreferredZoneName <String>]
     [-PreferredZoneUid <Guid>]
     [-Protocol <String>]
     [-ProvisioningType <ProvisioningType>]
     [-ReceiverIPAddress <String>]
     [-ReceiverName <String>]
     [-SecureIcaActive <Boolean>]
     [-SessionId <Int32>]
     [-SessionReconnection <SessionReconnection>]
     [-SessionState <SessionState>]
     [-SessionStateChangeTime <DateTime>]
     [-SessionSupport <SessionSupport>]
     [-SessionType <SessionType>]
     [-StartTime <DateTime>]
     [-TenantId <Guid>]
     [-UntrustedUserName <String>]
     [-UserFullName <String>]
     [-UserName <String>]
     [-UserSID <String>]
     [-UserUPN <String>]
     [-ZoneName <String>]
     [-ZoneUid <Guid>]
     [-ApplicationUid <Int32>]
     [-SharedDesktopUid <Int32>]
     -Property <String>
     [-ReturnTotalRecordCount]
     [-MaxRecordCount <Int32>]
     [-Skip <Int32>]
     [-SortBy <String>]
     [-Filter <String>]
     [-FilterScope <Guid>]
     [<CitrixCommonParameters>]
     [<CommonParameters>]
<!--NeedCopy-->
Group-BrokerSession
     [-Uid] <Int64>
     -Property <String>
     [<CitrixCommonParameters>]
     [<CommonParameters>]
<!--NeedCopy-->

Description

Filters sessions using the specified criteria, then groups and counts matching sessions with the same value for a particular property. The number of sessions in the group, and the property value for the group, is output. For example:

Group-BrokerSession -Property SessionState
Count Name
----- ----
   43 Active
   17 NonBrokeredSession
    3 Disconnected
Filtering supports the same options as the [Get-BrokerSession](Get-BrokerSession) cmdlet, and allows filtering on both machine and session properties.
Group-BrokerSession is similar to the standard PowerShell Group-Object, but is faster than piping the output of [Get-BrokerSession](Get-BrokerSession) into Group-Object when working with many machines.
Note that the MaxRecordCount, ReturnTotalRecordCount, Skip, and SortBy parameters apply to GroupInfo records output rather than the filtered sessions.
<!--NeedCopy-->

Examples

EXAMPLE 1

Group sessions on machines from the dg1 group by session state.

Group-BrokerSession -Property SessionState -DesktopGroupName dg1
<!--NeedCopy-->

EXAMPLE 2

List alphabetically the names of the clients connected to the site, but only show clients whose names starts with ‘ThinClient’.

Group-BrokerSession -Property ClientName -ClientName 'ThinClient*' -SortBy Name
<!--NeedCopy-->

Parameters

-Uid

Gets session by its Uid.

Type: Int64
Position: 2
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-Property

Selects the property by which matching sessions are grouped.

Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-SessionKey

Gets session having the specified unique key.

Type: Guid
Position: 2
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AgentVersion

Gets sessions with a specific Virtual Desktop Agent version.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AnonymousUserId

Gets sessions associated with the specified user ID.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationInUse

Gets sessions running specific applications (identified by their SDK Name property).

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AppState

Gets sessions by their app state.

Valid values are PreLogon, PreLaunched, Active, Desktop, Lingering and NoApps.

Type: SessionAppState
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AppStateLastChangeTime

Get sessions by their app state change time.

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AutonomouslyBrokered

Gets sessions according to whether they are autonomously brokered or not. Autonomously brokered sessions are HDX sessions established by direct connection without being brokered.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-BrokeringDuration

Gets session with a specific time taken to broker. In general, Citrix recommends using -Filter and relative comparisons.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-BrokeringTime

Get sessions brokered at a specific time. In general, Citrix recommends using -Filter and relative comparisons.

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-BrokeringUserName

Get sessions by brokering user.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-BrokeringUserSID

Get sessions by brokering user SID.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-CatalogName

Gets sessions on machines from a specific catalog name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-CbpVersion

The version of CBP that the VDA is currently registered with. This will be null when the VDA is not registered.

Type: CBPVersion
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ClientAddress

Get sessions by client IP address.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ClientName

Get sessions by client name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ClientPlatform

Get sessions by client platform.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ClientProductId

Get sessions by client product ID.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ClientVersion

Get sessions by client version.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ConnectedViaHostName

Get sessions by host name of the incoming connection. This is usually a proxy or Citrix Access Gateway server.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ConnectedViaIP

Get sessions by IP address of the incoming connection.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionMode

Gets sessions by the way in which the most recent connection to the session was established.

Valid modes are Brokered, Unbrokered, LeasedConnection, VdaHighAvailabilityMode, ThirdPartyBroker, and ThirdPartyBrokerWithLicensing.

Type: ConnectionMode
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ControllerDNSName

Gets sessions that are hosted on machines which are registered with a specific controller.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DesktopGroupName

Gets sessions from a desktop group with the specified name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DesktopGroupUid

Gets sessions from a desktop group with the specified UID.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DesktopKind

Gets sessions on a desktop of a particular kind.

Valid values are Private and Shared.

Type: DesktopKind
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DesktopSID

Get sessions by desktop SID.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DesktopUid

Get sessions by desktop Uid.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DeviceId

Get sessions by client device id.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-DNSName

Gets sessions by their machine’s DNS name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-EntitlementPolicyRuleUid

Gets sessions where the user was granted the entitlement to launch the session from the specified entitlement policy rule.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-EstablishmentDuration

Gets sessions which took a specific time to establish. In general, Citrix recommends using -Filter and relative comparisons.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-EstablishmentTime

Gets sessions which became established at a particular time. In general, Citrix recommends using -Filter and relative comparisons.

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-HardwareId

Get sessions by client hardware id.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Hidden

Get sessions by whether they are hidden or not. Hidden sessions are treated as though they do not exist when brokering sessions; a hidden session cannot be reconnected to, but a new session may be launched using the same entitlement.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-HostedMachineName

Gets sessions by their machine’s name as known to its hypervisor.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-HostingServerName

Gets sessions hosted by a machine with a specific name of the hosting hypervisor server.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-HypervisorConnectionName

Gets sessions hosted by a machine with a specific name of the hosting hypervisor connection.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IdleDuration

Gets sessions that have been idle for the specified period

Type: TimeSpan
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IdleSince

Time at which session went idle

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ImageOutOfDate

Gets sessions hosted by a machine with a specific ImageOutOfDate setting.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-InMaintenanceMode

Gets sessions hosted by a machine with a specific InMaintenanceMode setting.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IPAddress

Gets sessions hosted by a machine with a specific IP address.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IsAnonymousUser

Gets sessions depending on whether they were established anonymously ($true) or not ($false). An anonymous session is established without user credentials and a temporary local user account is used.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IsPhysical

Gets sessions hosted on machines where the flag indicating if the machine can be power managed by the Citrix Broker Service matches the requested value. Where the power state of the machine cannot be controlled, specify $true, otherwise $false.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LaunchedViaHostName

Get sessions by the host name of the StoreFront server from which a user launches a session.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LaunchedViaIP

Get sessions by the IP address of the StoreFront server from which a user launches a session.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LaunchedViaPublishedName

Gets sessions originally launched using a resource having a name matching the specified published name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LaunchedViaWorkspace

Gets sessions by whether they were launched via Citrix Workspace or not.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LogoffInProgress

Gets sessions by whether they are in the process of being logged off or not.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LogonInProgress

Gets sessions by whether they are still executing user logon processing or not.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MachineName

Gets sessions by their machine name (in the form DOMAIN\machine).

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MachineSummaryState

Gets sessions on a machine with a specific summary state.

Valid values are Off, Unregistered, Available, Disconnected, Preparing, and InUse.

Type: DesktopSummaryState
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MachineUid

Gets sessions on a machine with the specified UID.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Metadata

Gets records with matching metadata entries.

The value being compared with is a concatenation of the key name, a colon, and the value. For example: -Metadata “abc:x*” matches records with a metadata entry having a key name of “abc” and a value starting with the letter “x”.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-OSType

Gets sessions with a specific type of operating system.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PersistUserChanges

Gets sessions where the user changes are persisted in a particular manner. Values can be:

  • OnLocal - User changes are persisted locally.
  • Discard - User changes are discarded.
Type: PersistUserChanges
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PowerState

Gets sessions on machines in the specified power state.

Valid values are Unmanaged, Unknown, Unavailable, On, Suspended, TurningOn, TurningOff, Suspending, and Resuming.

Type: PowerState
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PreferredZoneName

Gets sessions originally launched with the specified preferred zone name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PreferredZoneUid

Gets sessions originally launched with the specified preferred zone Uid.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Protocol

Get sessions by connection protocol. Valid values are HDX, RDP and Console.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ProvisioningType

Gets sessions hosted on machines provisioned in a particular manner. Values can be:

  • Manual - No automated provisioning.
  • PVS - Machine provisioned by PVS (machine may be physical, blade, VM,…).
  • MCS - Machine provisioned by MCS (machine must be VM).
Type: ProvisioningType
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ReceiverIPAddress

Gets sessions with the specified client IP address supplied by Receiver (for example, StoreFront) when the session was launched, or reconnected.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ReceiverName

Gets sessions with the specified client name supplied by Receiver (for example, StoreFront) when the session was launched, or reconnected.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SecureIcaActive

Get sessions by their use of SecureICA.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionId

Deprecated.

Gets sessions by session ID, a unique identifier that Remote Desktop Services uses to track the session but it is only unique on that machine.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionReconnection

Get sessions by their session reconnection (roaming) behavior. Possible values are:

Always, DisconnectedOnly, and SameEndpointOnly.

Type: SessionReconnection
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionState

Get sessions by their state.

Valid values are Other, PreparingNewSession, Connected, Active, Disconnected, Reconnecting, NonBrokeredSession, and Unknown.

Type: SessionState
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionStateChangeTime

Get sessions by their last state change time. In general, Citrix recommends using -Filter and relative comparisons.

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionSupport

Gets sessions hosted on machines which support the required pattern of sessions. Values can be:

  • SingleSession - Single-session only machine.
  • MultiSession - Multi-session capable machine.
Type: SessionSupport
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionType

Gets sessions by their type.

Valid values are Application and Desktop.

Type: SessionType
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-StartTime

Gets sessions by their start time. In general, Citrix recommends using -Filter and relative comparisons.

Type: DateTime
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-TenantId

Gets sessions associated with the specified tenant.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UntrustedUserName

Gets sessions by the untrusted user name reported directly from the machine.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserFullName

Gets sessions by user’s full name (usually ‘first-name last-name’).

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserName

Get sessions by user name (in the form DOMAIN\user).

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserSID

Get sessions by user’s Windows SID.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserUPN

Gets sessions by user’s User Principal Name (in the form user@domain).

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ZoneName

Gets sessions hosted by machines located in the zone with the specified name.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ZoneUid

Gets sessions hosted by machines located in the zone with the specified UID.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationUid

Gets sessions running the application with the specified Uid.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SharedDesktopUid

Gets sessions by SharedDesktop Uid.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ReturnTotalRecordCount

When specified, this causes the cmdlet to output an error record containing the number of records available. This error record is additional information and does not affect the objects written to the output pipeline. See about_Broker_Filtering for details.

Type: SwitchParameter
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MaxRecordCount

Specifies the maximum number of records to return.

Type: Int32
Position: Named
Default value: 250
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Skips the specified number of records before returning results. Also reduces the count returned by -ReturnTotalRecordCount.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SortBy

Sorts the results by the specified list of properties. The list is a set of property names separated by commas, semi-colons, or spaces. Optionally, prefix each name with a + or - to indicate ascending or descending order. Ascending order is assumed if no prefix is present.

Type: String
Position: Named
Default value: The default sort order is by name or unique identifier.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Filter

Gets records that match a PowerShell style filter expression. See about_Broker_Filtering for details.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-FilterScope

Gets only results allowed by the specified scope id.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

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

Inputs

None

You cannot pipe input into this cmdlet.

Outputs

Citrix.Broker.Admin.SDK.GroupInfo

Each GroupInfo object represents one group, and contains the following properties:

  • Count: The count of sessions in this group.
  • Name: The value of the property the sessions were grouped by (as a string).

If you do not specify -SortBy, groups are sorted with the largest count first.

Notes

To compare dates or times, use -Filter and relative comparisons. For more information, see about_Broker_Filtering and the examples.

Group-BrokerSession