Killing Hanged Terminal Service Session in Windows Remotely

By | May 20, 2014

If you use Windows Terminal Services for remote desktop access, it’s common to run into this nasty error message from time to time:

The terminal server has exceeded the maximum number of allowed connections.

Step1 : Finding disconnected sessions with qwinsta or query

Open Cmd prompt and type :  qwinsta /server:       Please replace this with your server IP address



Now note down the session id of Disconnected session. In our case it is 1.


Step 2: Killing disconnected sessions with rwinsta or reset

In CMD prompt type this command :   rwinsta 2 /server:


Now you can see that the session is killed by running the qwinsta /server:   again.

Good Luck