I was hoping to get some help on a script that would run at user login which would terminate any disconnected desktops the user currently has.
Although I am very experienced with Powershell and PowerCLI, I am not very familiar with View scripting, and definitely not sure where I would even configure the login script once it was written.
Any help would be fantastic.
Such a script would have to go into a logon script.
But there are a couple of questions to be answered, the more important one being the one on security.
A logon script runs normally under the user's credentials, which means the user would need to have the authority to cancel open sessions.
With the later Horizon View module, you at least can connect from anywhere, no more need to run such a script on a Connection Server.
But afaik, there are no examples of such a script in the wild :smileygrin:
I can see how this script could be created but like Luc says the user would need to have rights in the horizon admin which is someting I am totally against. then there is the fact that the module for view doesn't accept current credentials so a password file needs to be created for each user or everytime they login they need to give their credentials a 2nd time which is bad as well.
Can you please give the use case for this and what are you trying to solve exactely?
In another topic I have created a script for admins to remove single desktops in certain error states maybe this helps you from the admin side of things.