:::: MENU ::::

User got stuck during Citrix logon process

7.9, Citrix, XenApp

User got stuck during Citrix logon process

The problem

Last week we got a call from a customer saying that one user is logging on for more than one hour. To confirm what was happening we opened the Citrix Director. We searched for the specific user and found the session status on Logging On. When opening the Citrix Studio we found the user session as active but the user isn’t active at all. When opening the specific server we couldn’t find the user under task manager users. Under processes in the task manager we could find only one process for that specific user, Powershell.exe. Powershell got stuck during execution of the logon script.

Troubleshooting

We tried the following to logoff or kill the session for that specific user.

  • Logoff the user via Citrix Studio. No success
  • Logoff the user via Citrix Director. No success
  • Kill the Powershell process via the task manager. No success
  • Kill the Powershell process via PSKill. No success
  • Kill the Powershell process via Process Explorer. No succes
  • Kill the Powershell process via Powershell commands. No success

Our next solution was putting the server in maintenance and reboot the server. This is not a preferred solution we quickly searched the internet (again). This with great success!! I found this article of George Spiers who described the same problem and he also provided a very good workaround. Below the workaround so that the user can logon again.

Solution/Workaround

According to the Citrix database the user has an active session. This means that when the user is trying to connect the user will reconnect to the faulty session.

To get around this problem you can hide the sessions with a Powershell command. The sessions are than treated as though they do not exist when brokering sessions. So the user will get a second but new session.

The following steps are performed to hide the faulty session.

  • Start Powershell with administrator permissions.
  • Add the Citrix Powershell snap-in:
    Add-Psnapin Citrix*
  • Find the affected user session.
    Get-BrokerSession -username DOMAIN\Username
  •  Confirm the option Hidden is set to False. The session is visible.

  •  Set the session to hidden.

    Get-BrokerSession -username DOMAIN\Username | Set-BrokerSession -hidden $true
  • Confirm the option Hidden is set to True. The session is now hidden.

  • Let the user logon again.

Please share your experience if this was helpful.

2 Comments

  1. Vaishnavi

    This also didn’t work for me.Please give some different workaround.

    Reply

Leave a comment