We use Windows "Remote Desktop" to log into server machines. At the moment, I am getting the following error message:

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

Now, the cause is obvious (2 other people are logged on right now!). I recall that in the past I solved this by logging on to some other machine in the same domain and then going to some admin tool which I cannot recall. From there I could see who was logged in and remotely terminate their session (assuming I had sufficient privileges) -- thereby freeing up one of the connections.

Does anyone know how to do this?

6 Answers 6


You can use Terminal Services Manager under Administrative Tools.

If you prefer a command-line solution, you can use this to list RDP sessions:

query session /server:servername

To reset a session, look for the relevant session ID in the "ID" column of the output from the above command, then use:

reset session <sessionid> /server:servername
  • When you reset a user's session, all of the programs that are currently running are closed and the session is immediately terminated. To simply disconnect the user use tsdiscon <sessionid> /server:servername which will leave their programs running and allows them to pick up where they left off when they reconnect later.
    – Tim Lewis
    Commented Jan 14, 2015 at 17:01

Also keep in mind that even though the remote server is not letting you RDP in normally, you can still hijack the console remotely:

To RDP to the Console of your remote server: from your client PC, open the CMD prompt and type: MSTSC /ADMIN (or if you are using an older RDP client, use MSTSC /CONSOLE)

This will allow you to remote logon to the console (and if necessary boot off anyone currently logged onto the console) - then you can use the Terminal Services Manager or Reset Session commands to boot off other RDP users...

  • 1
    Super kawaii! This worked even when the query session answer by ThatGraemeGuy complained about some RDP error.
    – Mike S
    Commented Sep 1, 2016 at 14:02

What you want is Terminal Services Manager


You can also log via console using rdp and boot the users.

  • 1
    the command for this is mstsc /console
    – mrTomahawk
    Commented Nov 5, 2009 at 22:07
  • thanks for that, I only know under linux.. which is: rdesktop -0 Commented Nov 5, 2009 at 22:58

Also, terminal services licenses are reasonably inexpensive. If you switch to licensed mode, you can tell the server how many licenses you have, and it'll accept up to that many connections.

Note that terminal services licensing was on the honor system last time I checked (ie, the Windows Server doesn't actually check your license keys, it just takes your word for it that you have however many you tell it you have), but that's neither here nor there. ;)

  • 1
    Not true. Terminal services licensing requires you to enter a valid key and activate each set of licenses. You also have to be running in Terminal Services Application Mode to utlized them. Commented Nov 5, 2009 at 21:35
  • Switching to application mode is not always desirable. Commented Nov 5, 2009 at 22:19
  • Hrm. Last time I set up Application Server on 2003, it definitely didn't validate or verify the licenses, you could just bump up the number and it would happily give you more connections. We didn't exploit that since we had a good deal on the terminal services licenses anyways. Why is the switch to application mode undesirable, apart from having to actually buy more licenses.
    – Graeme
    Commented Nov 6, 2009 at 16:19
  • Changing the institutional policy for how servers is managed is simply not an option for me, regardless of whether this would work.
    – mcherm
    Commented Nov 9, 2009 at 13:51

you can also go to the CMD prompt and type "mstsc /v: /admin" -- replace the 0's with your target IP

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .