Automation

 View Only
  • 1.  View Terminate Session Login Script

    Posted Oct 17, 2017 06:53 PM

    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!



  • 2.  RE: View Terminate Session Login Script

    Posted Oct 18, 2017 04:34 AM

    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:



  • 3.  RE: View Terminate Session Login Script

    Posted Oct 19, 2017 09:06 AM

    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?



  • 4.  RE: View Terminate Session Login Script

    Posted Oct 20, 2017 11:52 AM

    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