How to Remotely disconnect a Terminal Services Session


Windows server 2003/2008 allows two remote terminal services connections for administrative purposes. Every once in a while you get the “You exceeded the allowed connection count” message when trying to connect to a server via Remote Desktop Connection, because previous sessions were not disconnected correctly.
You can use the following method to remotely disconnect Terminal Server sessions,
1. Open command prompt
2. QUERY USER /SERVER:192.168.100.100 (Enter your remote server IP address)
3. RESET SESSION 1 /SERVER:192.162.100.100 (Here we are going to disconnect Session 1
4. You can run the below query to check number of active/disconnected terminal desktop connection
QUERY USER /SERVER:192.168.100.100