Showing posts with label rdp. Show all posts
Showing posts with label rdp. Show all posts

Friday, November 7, 2008

Killing RDP Session

It seems that some idiots prefer to click the x, of RDP client, rather than logging off the session properly. Clicking the x would leave the session exists in disconnected status, but not destroyed.

This is the remedy (besides bashing their heads repeatedly).

Query for the session IDs:
> qwinsta /SERVER:[server name]

SESSIONNAME USERNAME ID STATE TYPE DEVICE
console username 0 Active wdcon
rdp-tcp 65536 Listen rdpwd
jackass1 1 Disc rdpwd
jackass2 2 Disc rdpwd
Now, kill those stranglers:
> logoff 1 /SERVER:[server name]
> logoff 2 /SERVER:[server name]
Remember: you need to be an administrator of [server name] to do this.

More command line goodies: http://dev.remotenetworktechnology.com/cmd/tscmd.htm