Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Troubleshooting Remote Desktop

Modified on Fri, Feb 20, 2015, 11:26 PM by Administrator Categorized as Windows (OS, IE, IIS, and MSMQ)


This article outlines how to troubleshoot the following error when trying to Remote Desktop into a server: "The terminal server has exceeded the maximum number of allowed connections". It is adapted from http://www.howtogeek.com/howto/windows/command-line-hack-for-terminal-server-has-exceeded-the-maximum-number-of-allowed-connections/


1. Gaining Access

To use the command line hacks, you might need to run them from another server if your local operating system doesn’t include the commands. You will also need to make sure that you are logged onto that server with an administrative account. The easiest way to do that is just map a drive, as follows.

net use /user:[username] \\servername\share

2. Querying Sessions or Users

Querying sessions will give you all sessions (not just user sessions). Querying users will show you Idle Time and Logon Time. Both will show you a Session ID.

query session /server:servername
query user /server:servername

3. Forcibly Logging Off a User

The session-id is from the previous command. This command has no output, but if you query sessions or users again, you will see the specified session-id is gone.

reset session [session-id] /server:servername

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.