![]() For those sessions that have a disconnect time, it checks the current.Ignores any sessions that do not have a disconnect time.Ignores any sessions with no Unified Session Id.Ignores the Broker Server (or any other server).Ignores any sessions that do not say "STATE_DISCONNECTED".Gets a list of all Remote Desktop User Sessions.My script was written for Windows Server 2012 R2, by the way. The only edit that is required is the SERVERNAME which I set to exclude the Remote Desktop Broker Server, however you can exclude any server you like, or none at all. I wrote this Powershell script to run on a scheduled task to log off users that showed as disconnected for more than 2 minutes. I had this issue with locked Remote Desktop Application users. There you should see an error and you can even click retry or ignore. If this is still not working, try this solution from another question: When you connect with the RDP client, click it's "details"-button.I skipped them and just killed some obvious RDP-tasks.Īfter Step / Try 4 even the last crashed session was killed and the user was able to login again Be careful, because some tasks, most importantly csrss.exe, when killed, also would result in a reboot of the system. So I tried to end those 4 tasks assigned to this user.I tried the obvious one: Logging off the user. There you find one expandable list assigned to every remote desktop user - one list had no user name in it and only showed 4 tasks running. It worked for one session, but the next time it just had no effect, so I opened the task manager and the user tab. I tried to kill this session with either reset session 7 (fyi: rwinsta is an alias for reset session) on the CLI qwinsta lists all available sessions, inactive and active ones, there is one disconnected session (called "getr." in the screenshot).So I tried the following steps to disconnect the orphaned session: I had the same issue in Windows Server 2016. I could not found any way to really force kill a session :( 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. 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. Session persists and refuses to get killed. Tried killing all processes for that user - did not help. The session still hangs in the list with 'disconnected' status.ģ. Tried logging off/resetting session (which usually helps in these cases) - did not work. He's just a simple user so I can't expect detailed problem description.Ģ. He phoned me with "'connecting' message just hangs forever". I suppose the same happened today on my Win2008R2 Terminal Server.ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |