When you log off a Citrix ICA desktop (or application) session, from a 2008 XenApp 5.0 server, sometimes the operating system logoff screen is displayed, with a “Waiting on the User Profile Service.. “ or “Logging off…” message.
To prevent the logoff screen from appearing when closing Citrix ICA sessions, implement a logoff script by using a Group Policy setting that runs a batch file with the following command:
tsdiscon %SESSIONNAME%Then, the terminal server disconnects the session at the time of logoff and prevent the logoff screen from appearing. However, the terminal server continues to process the logoff action in the background.