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”.
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.
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.
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:
- Query the active user sessions to find who is logged in: query session /server:servername
- Terminate the user session by: Reset session [Session ID] /server:servername
This kills the session.