Windows has a command line tool which allows you to disconnect any RDS Session. The command line tool is “TSDISCON”, available in the System32 folder. Now, if you have connected using XenApp or XenDesktop, this tools does work. However, the Citrix Client will not know that the session has been disconnected, thus the Citrix Client window will remain active on the client’s end device.
There is no built-in tool from Citrix which has the same functionality as TSDISCON has. So I compiled a little tool which allows you to disconnect your Citrix sessions.
Enter CTXDISCON… This is a very basic command line tool which disconnects the Citrix session of the user who starts the executable. The Citrix Client (Receiver) will see that the Citrix session of the end user has been disconnected and will close automatically.
At this moment, there are no command line parameters, it just disconnects. It was built using the WFAPI SDK from Citrix. I’m planning to add more parameters so that it can be used as you would use TSDISCON. You can get the tool here. Hope you find it usefull.
Feel free to leave a comment for any questions or remarks.