• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Archives
  • Findings
  • Meetups
  • Videos
  • Events
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp Dashboards
    • ControlUp for Desktops
    • ControlUp for VDI
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp Workflows
  • Topics
    • Logos & Wallpaper
    • ControlUp.com
  • Join

How to Kill a Process in a User Session with ControlUp

Posted on January 16, 2025

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:

https://support.citrix.com/s/article/CTX891671-graceful-logoff-from-a-published-application-renders-the-session-in-active-state

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
Topics: Citrix, Logs, Scripts, Triggers

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp DEX solutions.

Browse here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2026 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..