Edit

Share via


Get-RdsDiagnosticActivities

Gets the details of a user action in the system.

Syntax

Default (Default)

Get-RdsDiagnosticActivities
    [-StartTime <DateTime>]
    [-EndTime <DateTime>]
    [-ActivityType <ActivityType>]
    [-UserName <String>]
    [-ActivityId <Guid>]
    [-Outcome <Outcome>]
    [-TenantName <String>]
    [-Deployment]
    [-Detailed]
    [<CommonParameters>]

Description

The Get-RdsDiagnosticActivities cmdlet gets the details of a user action in the system, both for end-user or administrative purposes. The list of activities can be filtered by the following parameters:

  • ActivityId
  • ActivityType
  • Outcome
  • StartTime (and optionally, EndTime)
  • UserName

You can combine multiple filters into a single query. If you do not specify a start time or a time range, you will receive a list of activities only for the last hour. You can also query with the -Detailed parameter to receive additional information about each activity. The additional information for each activity varies depending on the activity type.

Examples

Example 1: Retrieve basic diagnostic activities in a tenant

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso"

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           :
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       :
Errors            :

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Feed
StartTime         : 1/1/2018 3:52:20 PM
EndTime           : 1/1/2018 3:52:26 PM
UserName          : user2@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           :
LastHeartbeatTime : 1/1/2018 3:52:26 PM
Checkpoints       :
Errors            :

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Management
StartTime         : 1/1/2018 3:44:54 PM
EndTime           : 1/1/2018 3:44:54 PM
UserName          : admin@contoso.com
RoleInstances     : mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           :
LastHeartbeatTime : 1/1/2018 3:44:54 PM
Checkpoints       :
Errors            :

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:14:15 AM
EndTime           : 1/1/2018 3:18:00 AM
UserName          : user2@contoso.com
RoleInstances     : user2client.contoso.com;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782C3626;mrs-eus2r0c001-rdbroker-prod::RD28187853BC78;sh1.contoso.com;
Outcome           : Success
Status            : Completed
Details           :
LastHeartbeatTime : 1/1/2018 3:18:00 AM
Checkpoints       :
Errors            :

This command gets activities for the specified tenant. By running the Get-RdsDiagnosticActivities cmdlet without specifying a time range, you will only receive activities for the past hour.

Example 2: Retrieve detailed diagnostic activities in a tenant

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           : {[ClientOS, ], [ClientVersion, ], [ClientType, ], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       : {RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress...}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Feed
StartTime         : 1/1/2018 3:52:20 PM
EndTime           : 1/1/2018 3:52:26 PM
UserName          : user2@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, Win32 Chrome 70.0.3538.110], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [ClientIPAddress, ]...}
LastHeartbeatTime : 1/1/2018 3:52:26 PM
Checkpoints       : {TenantListComplete, TenantResourceComplete}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Management
StartTime         : 1/1/2018 3:44:54 PM
EndTime           : 1/1/2018 3:44:54 PM
UserName          : admin@contoso.com
RoleInstances     : mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           : {[Object, /RdsManagement/V1/TenantGroups/Default%20Tenant%20Group/Tenants/Contoso], [Method, Get], [Route,
                    Tenant::GetTenantAsync], [ObjectsFetched, 1]...}
LastHeartbeatTime : 1/1/2018 3:44:54 PM
Checkpoints       : {}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:14:15 AM
EndTime           : 1/1/2018 3:18:00 AM
UserName          : user2@contoso.com
RoleInstances     : user2client.contoso.com;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782C3626;mrs-eus2r0c001-rdbroker-prod::RD28187853BC78;sh1.contoso.com;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, WINDOWS 10.0.17763], [ClientVersion, 10.0.17763.1], [ClientType, MSTSC], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 3:18:00 AM
Checkpoints       : {LoadBalancedNewConnection, RdpStackAuthenticaticatedUser, RdpStackAuthorization, OnConnected...}
Errors            : {}

This command gets detailed activities for the specified tenant.

Example 3: Retrieve detailed diagnostics of a specific activity

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -ActivityGuid "xxxx-xxxx-xxxx-xxxx-xxxx" -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           : {[ClientOS, ], [ClientVersion, ], [ClientType, ], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       : {RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress...}
Errors            : {}

This command gets the specific detailed activity.

Example 4: Retrieve detailed diagnostics of a specific user

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -UserName "user2@contoso.com" -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Feed
StartTime         : 1/1/2018 3:52:20 PM
EndTime           : 1/1/2018 3:52:26 PM
UserName          : user2@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, Win32 Chrome 70.0.3538.110], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [ClientIPAddress, ]...}
LastHeartbeatTime : 1/1/2018 3:52:26 PM
Checkpoints       : {TenantListComplete, TenantResourceComplete}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:14:15 AM
EndTime           : 1/1/2018 3:18:00 AM
UserName          : user2@contoso.com
RoleInstances     : user2client.contoso.com;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782C3626;mrs-eus2r0c001-rdbroker-prod::RD28187853BC78;sh1.contoso.com;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, WINDOWS 10.0.17763], [ClientVersion, 10.0.17763.1], [ClientType, MSTSC], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 3:18:00 AM
Checkpoints       : {LoadBalancedNewConnection, RdpStackAuthenticaticatedUser, RdpStackAuthorization, OnConnected...}
Errors            : {}

This command gets detailed activities associated with the specified user name.

Example 5: Retrieve detailed diagnostics by a start time

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -StartTime "1/1/2018 3:45:00 PM" -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           : {[ClientOS, Win32 Edge 18.17763], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       : {RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress...}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Feed
StartTime         : 1/1/2018 3:52:20 PM
EndTime           : 1/1/2018 3:52:26 PM
UserName          : user2@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdbroker-prod-staging::RD28187853BC78;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, Win32 Chrome 70.0.3538.110], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [ClientIPAddress, ]...}
LastHeartbeatTime : 1/1/2018 3:52:26 PM
Checkpoints       : {TenantListComplete, TenantResourceComplete}
Errors            : {}

This command gets detailed activities that have completed after the specified time or that have been ongoing as of the specified time.

Example 6: Retrieve detailed diagnostics by a start time and end time

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -StartTime "1/1/2018 3:45:00 PM" -EndTime "1/1/2018 3:50:00 PM" -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           : {[ClientOS, Win32 Edge 18.17763], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       : {RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress...}
Errors            : {}

This command gets detailed activities that have completed during the specified time or that has been ongoing since the specified time range.

Example 7: Retrieve detailed diagnostics by activity type

PS C:\> Get-RdsDiagnosticActivities -TenantName "contoso" -ActivityType Connection -Detailed

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:20:00 PM
EndTime           :
UserName          : user1@contoso.com
RoleInstances     : rdwebclient;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782CE977;mrs-eus2r0c001-rdbroker-prod-staging::RD2818785C1CF1;sh1.contoso.com;
Outcome           :
Status            : Ongoing
Details           : {[ClientOS, Win32 Edge 18.17763], [ClientVersion, 1.0.4-wvd], [ClientType, HTML], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 4:01:00 PM
Checkpoints       : {RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress, RdpConnectionProgress...}
Errors            : {}

ActivityId        : xxxx-xxxx-xxxx-xxxx-xxxx
ActivityType      : Connection
StartTime         : 1/1/2018 3:14:15 AM
EndTime           : 1/1/2018 3:18:00 AM
UserName          : user2@contoso.com
RoleInstances     : user2client.contoso.com;mrs-eus2r0c001-rdgateway-prod-staging::RD2818782C3626;mrs-eus2r0c001-rdbroker-prod::RD28187853BC78;sh1.contoso.com;
Outcome           : Success
Status            : Completed
Details           : {[ClientOS, WINDOWS 10.0.17763], [ClientVersion, 10.0.17763.1], [ClientType, MSTSC], [PredecessorConnectionId, ]...}
LastHeartbeatTime : 1/1/2018 3:18:00 AM
Checkpoints       : {LoadBalancedNewConnection, RdpStackAuthenticaticatedUser, RdpStackAuthorization, OnConnected...}
Errors            : {}

This command gets detailed activities that match the specified activity type.

Parameters

-ActivityId

The ID of the activity.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ActivityType

The type of the activity. Activities are classified into the following categories:

  • Connection
  • Feed
  • Management

Parameter properties

Type:ActivityType
Default value:None
Accepted values:Connection, Management, Feed, RegistrationToken
Supports wildcards:False
DontShow:False
Aliases:Type

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Deployment

A scope specific to Windows Virtual Desktop.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Detailed

A switch indicating to return more detailed information for each activity. The additional information returned will vary depending on the type of each activity.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EndTime

The date time to use as the upper bound for querying activities.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False
Aliases:End

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Outcome

The outcome of the activity. Activities can have one of two outcomes:

  • Success
  • Failure

Parameter properties

Type:Outcome
Default value:None
Accepted values:Success, Failure
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StartTime

The date time to use as the lower bound for querying activities.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Start

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TenantName

The name of the tenant associated with the activity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Tenant

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-UserName

The user principal name (UPN) of the user associated with the activity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:User

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

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

Inputs

System.Nullable`1

System.Nullable`1

System.String

System.Nullable`1

System.Nullable`1

System.Management.Automation.SwitchParameter

Outputs

System.Object