A user asked for a script to kill a process in a user session, and was given suggestions such as using the Kill Process function in the ControlUp GUI or creating an SBA using Invoke-CUAction. There are also examples of such scripts available on the ControlUp Community website and a Citrix-specific solution called "LogoffCheckSysModules" was also suggested. For more information and examples, visit the links provided.
Read the entire ‘How to Kill a Process in a User Session with ControlUp’ thread below:
Hello – I would like a script to kill an instance of a process in a user session. The process runs on each user session on our VDAs but sometimes the user’s session does not gracefully logoff unless I kill the hung process in their session.
I can kill the process easily in the ControlUp GUI under the Sessions tab using Kill Process but would like to have it scripted instead. Any ideas? I would like to combine this with a trigger we already have implemented that logs off a user after being idle/disconnected for > 30 minutes.
this action in the library should be able to do that https://www.controlup.com/script-library-posts/terminate-process/
Anothe roption would be to create an sba that uses invoke-cuaction https://support.controlup.com/docs/invoke-cuaction
Bill has several of those in the library, it would just need to be adjusted for processes https://controlupcommunity.slack.com/archives/C054TRXJUQN/p1688056505493399 and another example here: https://controlupcommunity.slack.com/archives/C0473N33S00/p1735836476459949?thread_ts=1735586018.451999&cid=C0473N33S00
If you are using Citrix and published Applications you can try „LogoffCheckSysModules“-registry for graceful logoffs:
Continue reading and comment on the thread ‘How to Kill a Process in a User Session with ControlUp’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers