VMware Horizon Community
nburton935
Hot Shot
Hot Shot

Horizon UAG API - Get Authenticated Sessions (PowerShell)

Hey all,

I was recently asked to report on active UAG sessions so we could see peak times for external users with the recent COVID-19 remote work extravaganza. I came up with a PowerShell function to do so. Just pop this into a .ps1 file, open up PowerShell and execute it, and then Get-UAGSessionCount will be available as a commandlet for you to run.

Example:

Get-UAGSessionCount -username [UAG username] -password [UAG password] -UAGHostName [hostname/IP for your UAG management interface]

You will simply get a number back that shows the number of authenticated sessions. I essentially took this output, combined it with date/hour, and continuously export it to a text file to report into PowerBI so we have a real-time dashboard of our UAG stats.

Hope you enjoy - note that the API is not available until v3.5 as far as I know. I attached the ps1 to this post.

Labels (1)
Tags (1)
0 Kudos
0 Replies