I 'm looking for a KQL
(Kusto) query that gives me the total number of users per application or per application group for an Azure Virtual Desktop hostpool from the Log Analytics Workspace.
This query gives the total number of users per hostpool, but I would to distinct that further:
WVDConnections
| where TimeGenerated > ago(7d)
| where State == "Connected"
| project _ResourceId, UserName
| project-rename Hostpool = _ResourceId
| summarize DistinctUsers= dcount(UserName) by Hostpool
| extend HostPool=toupper(strcat(split(Hostpool, "/")[4], ".", split(Hostpool, "/")[8]))
| project HostPool, DistinctUsers
Thanks!
It is not giving enough information.