performance / tuning tips. to the point.                
 
About Us | Site Map | Privacy
Disclaimer | Feedback
About RSS Feed | Useful Links
Search Partner Links
Original Blog
Add to My Yahoo!
Google Reader or Homepage
del.icio.us performancewiki.com Latest Items


© 2005-2009 PerformanceWiki.com
All Rights Reserved.


Microsoft Terminal Server Client Tips



Kill Remote Desktop Connection (to free up)

When you don't log off Windows Remote Desktop (or terminal service client), the connection becomes
orphaned. You may get the following screen:

Too many sessions prevents future logins.  Do the following to clean up connections (on Windows 2003 server). 
From a client machines CMD windows:

D:\>query session /SERVER:myserver.myco.com
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 console                                     0  Conn    wdcon
 rdp-tcp                                 65536  Listen  rdpwd
 rdp-tcp#11        Administrator             1  Active  rdpwd
 rdp-tcp#4         Administrator             2  Active  rdpwd

The above show 2 connections to "myserver". You can kill the sessions with ID 1, 2, 3, so on.

tsdiscon 1 /SERVER:myserver.myco.com

where 1  rdp-tcp#11        Administrator             1  Active  rdpwd "ID" col
Also, can tskill to remotely stop a process