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

ControlUp Community

Connect, Learn, and Grow

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

Help with hung User Sessions in EUC Platforms on ControlUp Real-Time DX

Posted on February 1, 2023

This EUC discussion explored solutions to an issue where user’s sessions are hung and don’t want to reconnect. ControlUp’s Invoke-cuquery can be used to figure out where a user has sessions, and a registry key value can be used to log them off – though this process must be done remotely. Alternately, there may be solutions available through the EUC platform. When sessions don’t disconnect, this is usually due to antivirus, onedrive, or any systray tool – the best solution is to add these to the LogoffCheckSysModules registry value.


Read the entire ‘Solutions for Hung User Sessions in EUC Platforms’ thread below:

This more a general EUC ask as opposed to a CU ask, but has anyone ever wrote a script (that can be published as an app) that grabs the user’s info and somehow iterates all VDI sessions and if one is found for the user, then log them off? We have random issues where a user’s session is hung and it doesn’t want to reconnect and an admin has to find them and then log them off. TIA!


More to the route of the issue, you probably have a process stuck at logoff, If you check the processes that are still running in the user’s session and kill the processes one at a time you will see were it is getting stuck. This is a common issue with multi session servers @member


https://support.citrix.com/article/CTX891671/graceful-logoff-from-a-published-application-renders-the-session-in-active-stateYou can use the registry key LogoffCheckSysModules and enter those processes as value in the key, which stays active even after session logoff .

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlCitrixwfshellTWI

Name: LogoffCheckSysModules

Type: REG_SZ

Value : (Applications executable name. For example, MYAPP.exe)


yep tats in the article i posted


You can use invoke-cuquery to figure out where a user has sessions.

> Invoke-CUQuery -Scheme main -Table SessionsView -Fields sUserName,sServerName -Where "sUserName = ‘dennisg’"

Then user the sServerName field to log the user off of that server.

A few caveats:

• Invoke-cuquery has to run on a monitor

• You’d have to remotely log the user off. A future release will allow you to use Powershell to initiate actions though


You could probably query your EUC platform for the same if you don’t want to use CU. Though I don’t have readily available examples of thatwe have a trigger that looks for a session to go from Connected to Disconnected and then logs them off when that condition exists for # hours.


Usually, the process is the antivirus, onedrive or any tool using the systray… And the issue is that the session will not go to the disconnected state because, it’s not actually disconnected… The best solution is to determine the remaining process when a user close all "visible" applications and then add them to the LogoffCheckSysModules registry value…


Of course avoid to put the published application exe in this since you will logoff the session right after the logon automatically like one of my customers a few years ago 🙂

Continue reading and comment on the thread ‘Help with hung User Sessions in EUC Platforms on ControlUp Real-Time DX’.  Not a member? Join Here!


Categories: All Archives, ControlUp for VDI, ControlUp Scripts & Triggers
Topics: Antivirus, Citrix, Logs, PowerShell, Scripts, Triggers, VDI

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
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

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 solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download 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–2025 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..