Any opinions expressed here are my own and not necessarily those of my employer (I'm self-employed).

Mar 26, 2011

Ninja trick: The terminal server has exceeded the maximum number of allowed connections

If you work in an environment where several people fiddle around on the same servers, every once in a while you'll get the message "The terminal server has exceeded the maximum number of allowed connections" when you try to log on to a shared server through Remote Desktop.

In many cases this is because someone is lingering on the server. You could go through the process of figuring out who's logged on and asking them to log out, or kick them from the server. But there's another way.

It's possible to remotely connect to the physical console session on the server (also known as session 0). If someone is already using the console session, you'll learn who's connected and will be asked if you want to disconnect them. Since this feature is only intended for ninja hackers, you'll have to run this from command line.

On Windows 7/2008 Server:
mstsc.exe /admin /v:yourservername
On Windows 2003 server:
mstsc.exe /console /v:yourservername
You probably figured out that the command switches /admin and /console did the trick here. A word of advice, don't share this with your co-workers, you want to keep the console session to your self!

The /admin and /console switches are described in Microsoft's article on changes to remote administration in Windows Server 2008. Also, if you're running Windows Server 2003 or Windows XP it's possible to upgrade to Terminal Services Client 6.0 to get the new and shiny features offered by Remote Desktop on Vista and later.


  1. Also, experiment with

    qwinsta /server:servername.domain
    logoff /server:servername.domain

  2. I was initially using the following ninja hack to access our exchange server via rdp: mstsc.exe/admin/v:[ServerIP]

    It was working at one time, but now I'm receiving the following message:
    https://gyazo.com/e5fffff6a0bc7c2592f94c6b078c6ae7 <== After hitting Ok, the window just closes.

    Is this no longer a viable way of accessing a server from the back door, sorta speak?


    - Jon

  3. One year later...

    Jon add some spaces and it should work: mstsc.exe /admin /v:ServerIP

  4. freelancing meaning

    Thanks for sharing article nice one..waiting for next one keep it up

  5. Thanks for the always useful information. This is great information to help garage type SEO people like me.Remote Desktop Manager Enterprise

  6. This comment has been removed by the author.


  7. Very interesting post thanks for the interesting and useful information
    Everything In Here

  8. This comment has been removed by the author.

  9. This comment has been removed by the author.

  10. افضل شركة تنظيف ونظافة شاملة بالرياض
    شركة الصفرات للتنظيف هي الشركة الرائده
    شركة الصفرات للنظافة بالرياض
    نستخدم افضل الادوات والمعدات التي تساعدنا في عملية التنظيف
    كما لدينا اجهزه مستورده حديثة

  11. I enjoyed over read your blog post. This was actually what i was looking for and i am glad to came here!
    light novel

  12. This comment has been removed by the author.

  13. They either buy or lease the equipment from the facilitating organization, and thus, the facilitating organization underpins and deals with the server. buy vps with bitcoin

  14. Much obliged for the constantly valuable data. buy vps with bitcoin

  15. At Buy Legitimate Custom Essay Services, we usually provide Purchase Research Papers and guidance to our clients to help them have some experience on how to complete assignments on their own.

  16. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. https://aboutlogin.email/

  17. What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. oil tank removal

  18. Great article with excellent idea!Thank you for such a valuable article. I really appreciate for this great information.. pest control Kuala Lumpur

  19. This comment has been removed by the author.


Copyright notice

© André N. Klingsheim and www.dotnetnoob.com, 2009-2018. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to André N. Klingsheim and www.dotnetnoob.com with appropriate and specific direction to the original content.

Read other popular posts