Disconnect Remote Desktop Sessions
Thanks to Scott Forsyth, I found a way to disconnect remote desktop sessions when you are unable to connect to the server via RDP… Apparently qwinsta and rwinsta are built-in to Windows (XP Pro at least).
Scott said:
qwinsta /server:12.12.12.12
Where 12.12.12.12 is the IP address or name of the non-accessible machine.
This will display something like this:
> qwinsta /server:12.12.12.12
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
rdp-tcp#470 Bob 1 Active rdpwd
rdp-tcp#471 Jane 3 Active rdpwdNow I know that Bob and Jane are the two that are logged in. Since Jane left the office 20 minutes ago I know that she forgot to log off. I don’t know where Bob is but I only need one session so I’ll ignore him for now.
To disconnect Jane’s session I would type this:
rwinsta /server:12.12.12.12 3
Notice the 3 which is the session ID I found from using qwinsta above.
Leave a Reply
Want to join the discussion?Feel free to contribute!