Command Line Hack for: “Terminal Server Has Exceeded the Maximum Number of Allowed Connections”

If you’ve worked on a network with Windows servers, you’ve encountered this error message:

The terminal server has exceeded the maximum number of allowed connections. The system can not log you on. The system has reached its licensed logon limit. Please try again later.

Here’s a command line hack that you can use to figure out what sessions are connected to the server. Note that you could substitute the IP address for the server name. Note this command does not work with Windows XP

 query session /server:servername

Now we know that the session ID of the offending session is. We can use that in the next step, which is using the reset command to log off that user.

  reset session [ID] /server:servername


  reset session 1 /server:servername

With the default license, there can be only two sessions, 1 and 2

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.