In continuing with my Remote Desktop tricks (Who did not close their Remote Desktop Connection) , I thought I'd share another nugget of information. TSDISCON.exe is a command line tool included in Windows since 2000. With this tool you can disconnect a session from a remote server (Especially usefull for those times that someone forgot to logout and you keep receiving the maximum number of connections reached error.
The tsdiscon command uses the following syntax:
The parameters that are used by the tsdiscon command are:
This is an example of how to use the tsdiscon command to disconnect a session on the current Terminal Services server:
SESSIONNAME USERNAME ID STATE TYPE DEVICE console administrator 0 active wdcon rdp-tcp 65536 listen rdpwd >rdp-tcp#1 user1 1 active rdpwd rdp-tcp#2 user1 2 active rdpwd rdp-tcp#3 user2 3 active rdpwd rdp-tcp#4 user3 4 disc rdpwd rdp-tcp#5 user1 5 disc rdpwd 6 idle 7 idle
Page rendered at Saturday, July 31, 2010 6:03:35 AM (Eastern Standard Time, UTC-05:00)