I'm trying to figure out a way to return a list of Horizon sessions with the name of the Secure gateway through which the session is connecting.
When viewing Sessions via the Horizon view admin, its seen the "Secure Gateway" field.
The Get-RemoteSessions doesn't seem to return this field?
Specifically, I would like a list that shows me connected session through the Secure Gateway, then pipe that into a log-off command. That way we can automate a log-off for external users each night, but not affect our internal users.
I have 6.5 release 1 Build 4624819 loaded right now.
The View servers (7.1) have the version installed by View under the "extras" dir. It doesn't return a Get-PowerCLiVersion so I'm not sure is bundled with view 7.1
Strange, the PSSnapin that used to be there with View 5.*, don't work with Horizon View 6.* and 7.*
In fact I don't have these PSSnapin anymore on my Horizon View Connection Servers.
Could these be a relic from a previous View 5.* installation?
In PowerCLI 6.5.1 there is a whole new View module, and a HVHelper module.
No, its not a hold over from 5.1
Brand new installs of View 7.x place the add-snapin.ps1 to the extra directory on the view server. C:\program files\VMware\VMWare View\server\extra\powershell which calls the \bin\PowershellServiceCmdlets.dll has a file version of 22.214.171.12498
The server I'm testing with right now was installed fresh with 7.1 only a few weeks ago
But, either way, I was using the HVHelper module on my local copy of PowerCli and I wasn't able to return the secure gateway field.
I'll install any version of PowerCli available if need be.
Ok. reviving this thread.
I started playing with this again.
Using the following
I can then use this to return the session username and the securegatewayDNS
But this does not return the session status (ie connected or disconnected).
This one does show the connected/disconnect but not the username or machine id.
How do I combine these so I can see Username,MachineName, SecurityGatewayDNS and the Session status?
What I'm ultimately trying to do is find all sessions in a "connected" state that do NOT have a securitygatewayDNS and then log them off.
So if the user comes in via the Securitygateway, they are not logged off. But non-secure gateway session that are connected will get forced off. Disconnected states can remain.