mikeanderson173
Enthusiast
Enthusiast

VMware Horizon 7.7.0 powershell to see if a specific user ID has an active session

Jump to solution

I'm currently exploring working within VMware Horizon View powercli and I'm not having much success with trying to create a script to parse a list of users from a text file to see if they have an active session to a Horizon environment. I haven't done much with the Horizon module in powershell and I can't seem to find much documentation for what all of the available cmdlets do. Has anyone tried to do this same type of thing? If so, could I see an example of a script where this was accomplished?

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
0 Kudos
5 Replies
LucD
Leadership
Leadership

Would the script from Re: PowerCLI - List All View Connected Users and VM HostNames  help?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
mikeanderson173
Enthusiast
Enthusiast

I did come across that, but I don't have Vmware.Hv.QueryDefinition listed in extensiondata, so I don't think it will work for me.

0 Kudos
LucD
Leadership
Leadership

ExtensionData?
That is created through a New-Object cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
mikeanderson173
Enthusiast
Enthusiast

I'm sorry, I'm not super great with PowerCLI in general and the Horizon bit is on a whole other level for someone like me, it's not quite as straight forward as PowerCLI working with vCenter. Yes, your code seems to get me far enough. Thanks for the help!

0 Kudos
LucD
Leadership
Leadership

No problem.
And to be honest, I'm not a big fan how the interface to Horizon View was done either :smileygrin:


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos