skip navigation

www.Hilands.com


Content:: Dropping a terminal services connection

The Terminal Server has exceeded the maximum number of allowed connection.
Dropping a terminal services connection
By default windows only allows two remote terminal service connections to a system. You have probably seen an error message stating "The Terminal Server has exceeded the maximum number of allowed connection.". If a connection drops it might not be possible to log back in until the connection drops. When you are in a hurry it is useful to know how to drop the disconnected users.

We can use the "qinsta" command to view a list of the users the system currently recognizes. # qwinsta
# qwinsta /server:<IP Address>
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 console                                     0  Conn    wdcon
 rdp-tcp                                 65536  Listen  rdpwd
 rdp-tcp#65        Jack                      2  Active  rdpwd
                   Joe                       1  Disc    rdpwd

Looking at the "STATE" we can see Joe is listed as "Disc" meaning the user is disconnected. To clear this user we can use the "rwinsta" command to do this.
Example commands :
rwinsta <sessionname> <id> /server:<ip or winname>
rwinsta rdp-tcp#01 1 /server:192.168.1.1

rwinsta 1 /server:<IP Address> Running "qwinsta" again we can see Joe has successfully been disconnected. # qwinsta /server:<IP Address>
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 console                                     0  Conn    wdcon
 rdp-tcp                                 65536  Listen  rdpwd
 rdp-tcp#65        Jack                      2  Active  rdpwd

Last Modified: 2010-05-04