<Tap Tap> Is this thing still on? Good!
The VMware Unified Access Gateway really is a wonderful device. With a quick deployment of an OVF you’re up and running with free remote access to your VMware Horizon environment. The device is so simple in fact, that it’s often a case of set and forget, it does the hard work freeing you up to do more important things.
A request came in from a customer last year to be able to view more about what this little magic appliance is doing, how healthy it is and how many users it is currently servicing.
For VMware vRealize Operations for Horizon customers, this data is all available directly in the VROPS portal, but what if you don’t have VMware vRealize Operations for Horizon? or want to query this in an automated fashion?
Well the good news is, the clever engineers behind this project not only allowed RESTful configuration of the product, they also allowed restful retrieval of the information too!
if you browse to https://<your device IP or name>:9443/rest/v1/monitor/stats you’ll get all the info you could want as below: (after you authenticate, of course).
So that’s great, but wouldn’t it be nice if we could get that information from PowerShell too?
I’ve thrown together a Powershell module here you can use or hack apart for your own purposes to allow you to query your own Unified Access Gateway appliances.
Simply import the module:
from here you can see the exported cmdlets:
and here are the two exports below:
So that’s it! A big thank you to my colleague Mark Benson for the endless, cheerful help. Despite how much of a pest i can be!