VMware Cloud Community
CRad14
Hot Shot
Hot Shot

View Terminate Session Login Script

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.

Thanks!

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
0 Kudos
3 Replies
LucD
Leadership
Leadership

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:


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

0 Kudos
Magneet
Hot Shot
Hot Shot

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?

0 Kudos
Magneet
Hot Shot
Hot Shot

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.

Re: Reset/Refresh Horizon Desktop in a Problem State using PowerShell

0 Kudos