The terminal server has exceeded the maximum number of allowed connections – Solution

When trying to take a Remote desktop on Windows Servers, got the error message “The terminal server has exceeded the maximum number of allowed connections”.

Root Cause: 
This is because Windows 2003 Server supports only two active RDP connections. When you try as a third, you may experience this issue. Ideally, the user must “Log Off” to end up the session rather than disconnect.

The terminal server has exceeded the maximum number of allowed connections

Just closing the remote desktop window disconnects the user, but it keeps the session active. The next time when a user tries to log in,  he gets the error message.

Solution:

Alright, what is the workaround to bypass this error and log in to Windows Server 2003 or Windows Server 2008? Go to the command line, or Run dialog box. If you are running remote desktop from Windows Server 2003 or Windows XP, enter: MSTSC /v: <MachineName or IP> /f -console

E.g. MSTSC /v:SPSrv01 /f -console

For Windows 2008/Windows 7, use: mstsc /v:SPSrv01 /f /admin

Now, you should be able to login to the server and logoff disconnected user sessions from Task Manager. For some reason, if the above methods didn’t work, use the alternate: force log-off uses sessions. Here is how:

  1. Query the active user sessions to find who is logged in: query session /server:servername
  2. Terminate the user session by: Reset session [Session ID] /server:servername

This kills the session.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

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