Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for some ideas on how to disconnect, logoff, or reset a user's session in a 2008 Terminal Server (unable to login as the user either as it is completely locked-up). This is a production environment, so rebooting the server or doing something system-wide is out of the question for now. Any Powershell tricks to help us with this?

We've tried to disconnect, log the user off and reset the session as well as killing the session's processes too, directly from the same terminal server (from the task manager, Terminal Services Manager and the Resource Monitor) with no results.

Help!


UPDATE: We ended up rebooting the server as no other attempts that we could think of worked. I'll leave this question open hoping someone might have more information about this one issue, and it's potential fixes

share|improve this question
1  
I have the exact same issue on my windows 2008 R2 SP1 Terminal servers. They just randomly hang and users are unable to logoff or logon to the server. I cannot log on localy as local admin or domain admin. The only way to connect to the server is using compmgmt.msc but even here I cannot see any issues in the event logs. At some stage I get a message saying the IMA service is not responding and the server has been removed from teh farm. The only way to resolve this is to reboot the server Hard. Power off and back on again. I have not been able to narrow the cause of this down to anything and i –  user81969 May 19 '11 at 10:02
    
    
1  
Potentially useful links for anyone encountering this issue going forwards –  JohnLBevan Aug 22 at 18:18

10 Answers 10

I want to share how I reset of the account without the need to reboot the server. First of all you need to have administrator access to the server. I use the following logon option: mstsc /v:servername /console /admin in order to access the server. Then in "Windows Taks Manager", go to the Users tab and proceed to do a right click over the account that you want to "Log Off", select log off. This should free the locked session used by that account.

share|improve this answer

We just had a similar issue with our Windows Server 2008 R2 Remote Desktop server. The user session showed "Active" when looking at RDS Manager, but did not have the associated session ID# or connected device showing (both were blank).

All of the tricks above did not resolve the issue. When connecting as the user in question, an error message came back stating that the Terminal Server was busy and to try again later or contact the administrator.

We wound up rebooting the server as well.

share|improve this answer

What worked for me to resolve this same issue was to kill off all the processes running under the locked account from under Task Manager and then I was able to simply log off that account (from an Administrator account).

The user was then able to log back on under the account.

No reboot was necessary and no third party software needed to be downloaded.

share|improve this answer

I suppose the same happened today on my Win2008R2 Terminal Server. Sympthoms were: 1. He phoned me with "'connecting' message just hangs forever". He's just a simple user so I can't expect detailed problem description. 2. Tried logging off/resetting session (which usually helps in these cases) - did not work. The session still hangs in the list with 'disconnected' status. 3. Tried killing all processes for that user - did not help. Session persists and refuses to get killed.

Solution was - connect as user (login with his credentials if you can reset his password or use some kind of remote assistance to see what happens on his computer) and see what happens in logon window. When connecting I clicked on RDP Client's 'details' button - and here it was, a error message that winlogon did something wrong, it was waiting for user to click on 'retry/ignore/etc' buttons and since it's the omnipotent winlogon it caused all that weird behavior.

p.s. I could not found any way to really force kill a session :(

share|improve this answer

The simple answer is to run an elevated command prompt and type "Taskmgr" and then it will allow you to logoff the sessions under the USERS tab. It will not work without being in the elevated session.

share|improve this answer

You can start a cmd, do a query session, check the id of the session to be killed and then do a reset session. For instance, if with query session you get that the session name rdp-tcp#1 is the one you want to kill, then you can execute reset session rdp-tcp#1 and get it killed.

share|improve this answer
    
Thanks, but that didn't help either. –  l0c0b0x Jun 14 '10 at 18:29

Maybe there is a process still running, blocking the logoff process. Check the still running processes for the affected user. Then kill process one by one to see witch one is causing the problem.

Check also the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Registry key that only needed Processes are started. In 64bit it is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run.

share|improve this answer

You can download the "Process Explorer" tool from Microsoft and use that to solve your problem. If you have the session IDs, you can find their respective processes. Then if a user session is disconnected, you can kill the process with Process Explorer.

share|improve this answer

Not exactly the same environment (we have 2012r2) but restarting the Hyper-V Virtual Machine Management service (VMMS) released the connection for me.

share|improve this answer

Unfortunately. My user session was disconnected. The task manager did not show any processes runing as the user. I could not log the user off from the task manager. I tried reset session id command and ended up freezing up as well. I had to end up logging in in a different session as the administrator, deleting the account and re-creating a new one.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.