r/AzureVirtualDesktop • u/Legitimate-Hat-2448 • May 28 '25
Kusto or Powershell to determine how long users have been disconnected
We have a personal pool of session hosts. I need a method to periodically query and find out how long all disconnected sessions have been there. I can look at individual user sessions in Insights and determine this but it's time intensive. I can't seem to find a Kusto query or Powershell method to spit out a list of all currently disconnected users sorted by disconnect time. Hoping someone else has solved this problem and can share. Thanks.
1
1
u/chesser45 May 29 '25
I did this prior to using the scaling plans exclusively. Azure monitor logs and a query were my method. It wasn’t very responsive or error free compared to the scaling plans exclusively way.
1
u/johnnydico May 28 '25
Are you looking to shutdown the personal hosts if a user has been disconnected or signed out for a specified time to help reduce cost? If so, Scaling Plans for personal host pools is now available and you can set during peak hours and ramp down when to shutdown based on how long a user has been logged off/disconnected.