KQL Query for AVD Remote App Usage

Here’s a KQL Query you can use to get 30 Day usage metrics for a Azure Virtual Desktop Remote App.

Includes Start Time, End Time, Duration, UserName, ResourceAlias/RemoteAppName, SessionHostName.

let startDate = ago(30d);
let startSessions = WVDConnections
| where TimeGenerated > startDate
| where State == "Started" and ResourceAlias !in ("SessionDesktop", "<>")
| project StartTime = TimeGenerated, StartCorrelationId = CorrelationId, UserName, ResourceAlias, SessionHostName;
let endSessions = WVDConnections
| where TimeGenerated > startDate
| where State == "Completed" and ResourceAlias !in ("SessionDesktop", "<>")
| project EndTime = TimeGenerated, EndCorrelationId = CorrelationId;
startSessions
| join kind=inner endSessions on $left.StartCorrelationId == $right.EndCorrelationId
| extend Duration = EndTime - StartTime
| project StartTime, EndTime, Duration, UserName, ResourceAlias, SessionHostName

Share or Save this:
Share