Get-CitrixUserSessions
SYNOPSIS
Retrieve Citrix user session information.
SYNTAX
Get-CitrixUserSessions [-Identity] <String> [[-Count] <Int16>] [[-Credential] <PSCredential>]
[<CommonParameters>]
DESCRIPTION
The `Get-UserSessions` function retrieves session information for a specified Citrix user. It queries the Citrix Monitor API to fetch details such as session start and end times, client information, server name, session type, and connection state. The function supports authentication using credentials or default credentials.
EXAMPLES
EXAMPLE 1
Retrieves the last 10 sessions for the user "jdoe" using default credentials.
EXAMPLE 2
Retrieves the last 5 sessions for the user "jdoe" using the specified credentials.
PARAMETERS
-Identity
The username or UPN of the user whose sessions will be retrieved.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Count
The maximum number of sessions to retrieve. Defaults to 10. Valid range is 1 to 999.
Type: Int16
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False
-Credential
The credentials to use for authentication. If not provided, default credentials will be used.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False
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.