Jump to content
Welcome to our new Citrix community!
  • 0

Script to close disconnected sessions associated with an endpoint at shutdown

Chad Dotson


Is there a way to script the log off of a currently disconnected session when an endpoint (ex. Windows 10) shuts down?  Running that script would be simple: GPO, but thus far I haven't been able to find a mechanism to force the log off.  


SelfService.exe -logoff will force the logoff of an active session but is not able to locate and log off disconnected sessions.


Any ideas?

Link to comment

1 answer to this question

Recommended Posts

  • 0

If I understand you correctly, you want the Server-side session to logoff when the client endpoint reboots or shuts down?  There is no mechanism to detect if the client OS is running.  You set policies based upon Disconnection of the endpoint, when that disconnect time reaches a specific threshold then you terminate the session.  I suppose you 'could' write a script that pings any clients connected to a server and terminates the session based upon connection state, but what does that do to sessions from devices where the network connection may be interrupted for a brief period.  If you have tablet users for instance, those devices will sleep pretty quickly if the user isn't keeping it awake,  Do you really want that user to be forced to launch the app several times per day and lose any work they had been in the middle of?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...