
When a user establishes a Remote Desktop connection to the WHS this connection will remain active until the user selects “Log Off” from the Start Menu. If a user simply closes the remote desktop window when they’re finished, that username will still remain logged on.
The software running on the WHS to facilitate the Remote Desktop connection will only allow for up to two simultaneous sessions. Active and disconnected sessions are calculated in this connection limit as is the Administrator account also. The console session, however, does not count against the connection limit.
If a third attempt is made to login to the server, the dreaded “The terminal server has exceeded the maximum number of allowed connections” error will be shown to the user, and they will be unable to complete the login process. You can’t even connect to disconnect the old sessions BUT there is a way around this:
Simply click OK to the error message and wait for unto 30 seconds for the window to close then simply type the following in a Start – RUN or CMD Prompt on your client machine.
mstsc /v:00.00.00.00 /f -console
Replace 00.00.00.00 with your server’s IP Address or server name. e.g.SERVER
Type in your administrator password. This will then connect you to the Console Session on the server and allow you to remote control the machine again.
Once in Click Start, point to All Programs, point to Administrative Tools, and then click Terminal Services Manager.
In the left hand column you should see your server name. Click on it once. Note the Users Tab in the right pane.
You should see a list of users. You need to reset the two “Disconnected” users. You can do this by right clicking the disconnected user and selecting “Reset.” You should now be able to connect with RDP again after Start – Log Off.
When logging in under this special Console session always kill the inactive sessions first, because if you get disconnected again you will have to connect your monitor, keyboard and mouse.
Only use this session to terminate the other two sessions and not for any other use.
In future when you are done with a Remote Desktop session on WHS, you should always use “Log Off” rather than disconnecting by closing the RD window with the X as this will disconnect from the session but leave it active.

P.S. You could also use the easy option and just reboot the Windows Home Server.




















August 10, 2007 at 11:24 pm
Is it possible to increase the number of allowed connections to a higher number, e.g. 5 to decrease the liklihood that you would have to perform this reset proceedure?
August 11, 2007 at 10:46 am
Hi markvader,
Unfortunately it is not possible to increase the number of allowed connections to a higher number. I am afraid with are stuck with 2 only.
September 5, 2007 at 7:38 am
Brilliant! It works!
September 5, 2007 at 9:51 am
Hi Mike Oesch,
Glad I could be of service.
September 19, 2007 at 9:12 am
Thanks a lot. You saved my life.
September 19, 2007 at 10:40 am
Hi Waqas Murtaza Butt,
I’m glad I could help you.
October 17, 2007 at 3:26 am
Hi Philip,
Nice work. Got a related query if you can help. If a user receives the “exceeded the maximum number of allowed connections” message, does it get logged to any event log?
It’s not really a login failure, so I can’t seem to find it in security logs. Am I looking in the wrong place?
October 18, 2007 at 8:59 am
Hi Jeff,
The only places I could find on the server that has logged info is in Event Viewer, Security items and in Terminal Services Manager, This Computer branch, “your server name”, and on the right hand side the Sessions tab.
October 19, 2007 at 9:16 am
This info is very helpful! Especially in a multi windows server environment like our office and the sys administrator is always missing in action hahahaha, Thanks a lot!
October 19, 2007 at 10:01 am
Hi ian nix,
Glad we could be of service. Sys administrator, who are they lol.
November 30, 2007 at 7:34 am
Thanks for the great info it works fine
thanks a lot one more time thanks MR.Philip Churchill
November 30, 2007 at 9:19 am
Hi bharathy,
Glad we could help.
December 13, 2007 at 10:06 pm
you are the man, this saved me
December 16, 2007 at 5:12 pm
Hi Ed,
Glad we could help.
January 16, 2008 at 2:43 am
really just want to say big thank you. you save my time of traveling to office from home just to physically logging the server to kill those inactive user before I can logging from home again. Thanks again.
January 25, 2008 at 2:38 am
Add me to the list…
ditto ditto ditto
Thank You for posting this for all of us…
March 21, 2008 at 2:02 pm
Bingo.. this is exactly what I needed.. Very well written.. thanks Philip..
March 24, 2008 at 3:41 am
Thanks man.
Help me to resolve the 2 connection limits and find out who is hogging the connection~!
March 25, 2008 at 1:04 am
Thanks a ton! This was awesome.
April 16, 2008 at 5:43 pm
Nice! And as an added bonus, I got to make it look like I knew something the boss didn’t. :-)
April 26, 2008 at 9:16 pm
Thanks Philip. Big help!
April 29, 2008 at 12:02 pm
This is some useful info, as the users have a habit of simply closing the connection as opposed to logging off.
Wish the number could be increased though.
Thx alot.
May 7, 2008 at 1:16 pm
Good tip! Before I knew this I used the free service of http://www.logmein.com to log in as administrator to log off the inactive users.
May 16, 2008 at 6:54 am
Please Philip Churchill
maybe there is a way to increase the connections more than 2?
because there is a teb (unlimited connections)
can you help me
Haider
May 23, 2008 at 7:27 pm
The way remote desktop for administration works in terminal services is that you are allowed: 1 console session for admin purposes and 2 rd sessions for users. The only way to increase this number is to install terminal server and add some cals to the server. Once you install terminal server and switch to remote desktop for apps instead of administration, you will be given a grace period, something like 90 or 180 days, before having to setup the licensing. Hoever, this is only meant for giving you time to set this up, it isn’t intended soley as a free grace period.
June 3, 2008 at 6:53 am
[...] your server??s IP … point to Administrative Tools, and then click Terminal Services Manager. …http://mswhs.com/2007/06/07/error-the-terminal-server-has-exceeded-the-maximum-number-of-allowed-con…Lost &amp FoundMstsc. Updated: September 28, 2007 … that were created with Client Connection [...]
June 3, 2008 at 10:34 pm
[...] maximum number of allowed connections נכנס ל start/ Run ונזין את הפקודה הבאה: mstsc /v:00.00.00.00 /f -console כשבמקום האפסים נכניס את כתובת ה- IP הגדרת (remote desktop) [...]
June 5, 2008 at 9:03 am
Hi Philip,
i did, as you have explained, but still got the same error message of – the terminal server has exceeded the maximum number of allowed connections. any solution for the same. Thanks.
June 6, 2008 at 8:23 pm
This doesn’t seem to work on a Windows 2000 server. Any ideas (other then upgrading of course).
July 8, 2008 at 10:40 am
THANKS. I choose the easy way: reboot my server. because i use WIN2K.
July 12, 2008 at 10:14 pm
[...] טיפ: כאשר מתקבלת הודעת שגיאה שיותר מידי משתמשים מחוברים בו זמנית. mstsc /v:00.00.00.00 /f -console [...]
July 18, 2008 at 9:31 am
thanks
it was very understanding and helpfull article
August 2, 2008 at 6:06 pm
Thanks Philip for sharing your knowledge and helping others.
August 6, 2008 at 7:38 am
dont know where is a difference, but in my client I need to type /admin comand instead of -console… so, the full url are :
mstsc /v:00.00.00.00 /f /admin
btw, You can always check available keys using
mstsc /?
August 29, 2008 at 6:08 am
[...] ERROR The terminal server has exceeded the maximum number of allowed connections « MS Windows Home … (tags: windows terminalservices) [...]
August 29, 2008 at 11:27 pm
YOU ARE MY HERO
September 1, 2008 at 4:49 pm
I have written a GUI that does this for you if anyone is interested. It allows you to query a server by name or IP and kill a specified user. It can be found at: http://www.jonathanrhodes.net/
September 4, 2008 at 10:31 pm
Aaah! Almost… This is the closest I get…
I get a user login box, but whatever I type I still get ‘Exceeded maximum number of connections’
The server is in another country so switching it off is not really an option, its also behind a firewall where only port 80 & 3389 are open.
Any ideas?
September 14, 2008 at 5:34 am
Thanks! It was a very helpful article! :)
September 23, 2008 at 10:49 pm
THANK YOU!!! You just saved me 20 minutes drive time. More importantly, I now know how to fix the issue the next time I forget to logout (cause you know it’s gonna happen).
October 13, 2008 at 10:51 am
i want to renew this server ks200724.kimsufi.com
but i don’t know how to renew it,can any one pls explain to me the process i could renew this server ks200724.kimsufi.com
October 16, 2008 at 1:58 pm
Arrgh, I wish I had this information the last time it happened! Could not figure out what to do for the life of me; had to reformat in order to connect again. Thanks for the info though. Now I know exactly what to do if this happens again.
October 23, 2008 at 8:50 am
VERY useful info!
Thanks a lot.
:-)
October 30, 2008 at 7:51 pm
Is there a way to automatically log of a user/session after X amount of inactivity?
October 31, 2008 at 3:50 am
GREAT TIP! Thanks a lot!
November 6, 2008 at 12:07 pm
Michael go to the user properties and under the “sessions” tab you’ll find what you want!!! :)
November 7, 2008 at 11:40 pm
I have read this entire thing, and unless I TOTALLY missed it . . did anyone mention install the admin pack (any server \\homeserver\admin$\system32\adminpak.msi ) and use tsadmin.exe? I saw where someone wrote an app, but I think Micro$ofts “supported” app would be a better way to go . .unless again . . .I missed something. with this you can disconnect sessions until your heart stops. – R
November 10, 2008 at 12:20 pm
terminal server has exceeded the maximum number of allowed connections
November 12, 2008 at 1:30 am
Is that an answer to my post? If so . . . . huh?
November 29, 2008 at 6:18 am
Big Help!and Thanks alot
But ,I want to know why we cann’t increase the number of allowed connections.
December 3, 2008 at 4:00 pm
Khaing: Quonting MicrosoftJunkie:”The way remote desktop for administration works in terminal services is that you are allowed: 1 console session for admin purposes and 2 rd sessions for users. The only way to increase this number is to install terminal server and add some cals to the server. Once you install terminal server and switch to remote desktop for apps instead of administration, you will be given a grace period, something like 90 or 180 days, before having to setup the licensing. Hoever, this is only meant for giving you time to set this up, it isn’t intended soley as a free grace period.”
December 10, 2008 at 10:50 pm
How can I check what users are using the 2 sessions?
Thanks in advance
January 6, 2009 at 10:40 am
Rafael, you should be able to see what users are using the two sessions by following the instructions above.
See the original notes, “… In the left hand column you should see your server name. Click on it once. Note the Users Tab in the right pane. You should see a list of users.”
January 23, 2009 at 6:15 am
This is a nice solution but I want to know, How can I increase the limit of users on terminal server (O.S. 2000 server) ?
Please help me.
Thanx & Regards
Romy.
January 30, 2009 at 10:48 am
Hello, it’s a nice temporary solution.
So, I changed the parameter:
“maximun connections” on the network adaptor icon from Terminal Services Configuration, I verify the registry (MaxInstanceCount) and the value was changed.
But I think that the limit is always 2.
Have you got an idea about?
Best regards.
February 3, 2009 at 10:09 am
Thanks a lot!
February 15, 2009 at 12:52 am
Thanks a lot for sharing this. You saved me
February 16, 2009 at 2:39 pm
Thank you very much. It does saved lots of my time…
You saved me… Cheers
February 19, 2009 at 1:07 pm
Thanks for sharing…
March 11, 2009 at 1:02 pm
thanks for the information.
April 5, 2009 at 9:18 pm
saved my life bud, thanks!!!
did have to use this: mstsc /v:00.00.00.00 /f /admin
April 10, 2009 at 5:50 am
If the above solution did not work as it not worked for me i extended the command admin switch
and login with Admin userid and password
mstsc /v:xxx.xx.xxx.xxx /admin
Replace xxx.xx.xxx.xxx with your IP Address
Happy logging
April 10, 2009 at 4:52 pm
You are the man….thanks a lot buddy..You saved me…
April 30, 2009 at 3:29 pm
A quick way to check logons is to go into task manager, select the last tab (Users) and you can see who is logged on and/or disconnected.
You also get the option to log them off and hence reclain the termin server session
I just find it much quicker to check this
Cheers
June 15, 2009 at 3:53 pm
Hi,
This solution does not helped me…
but It made me to read “mstsc” help.
I found that the parameter -admin help you to connect any way !
this is my command :
mstsc -v:X.X.X.X -admin
June 29, 2009 at 9:43 am
It works! just works. Thanks
July 13, 2009 at 9:17 pm
You have nol idea how much of a headche you just saved me from. mstsc /v:00.00.00.00 /f /admin is what I had to use. Thanks a million…IT folks will ALWAYS SAVE THE WORLD. Peace!!!!!!!!!!!!!!!!!!!!!!!
August 23, 2009 at 3:09 pm
Thanks!
September 11, 2009 at 9:37 am
THIS IS THE LIFE SAVER RIGHT HERE
log off remote desktop RDP Terminal exceeded
run:
mstsc /v:00.00.00.00 /f /admin
replace 00 with your server IP
thank you all, thank you james!
September 30, 2009 at 10:24 pm
I use the admin switch and it works great! i am using XP. and our users always leave the connection on in the windows 2003 server! thank you very much for the tip!!!
October 1, 2009 at 3:17 pm
Thanx alot mate.Saved My life
October 5, 2009 at 7:14 am
ohh….thank you so much…saved my day!!
October 12, 2009 at 1:40 pm
Oke it works fine.
Tnx.
October 16, 2009 at 11:20 pm
Very Nice. Thank You.Saved my day :)
November 13, 2009 at 9:22 pm
you write:
Khaing: Quonting MicrosoftJunkie:”The way remote desktop for administration works in terminal services is that you are allowed: 1 console session for admin purposes and 2 rd sessions for users. The only way to increase this number is to install terminal server and add some cals to the server. Once you install terminal server and switch to remote desktop for apps instead of administration, you will be given a grace period, something like 90 or 180 days, before having to setup the licensing. Hoever, this is only meant for giving you time to set this up, it isn’t intended soley as a free grace period.”
But where to get this or buy these cals for WHS?
need 3 more thx
December 1, 2009 at 1:16 pm
for 2k use the following:
qwinsta /server:0.0.0.0
rwinsta /server:0.0.0.0 session_num
replace 0.0.0.0 with ip of server
session _num = session_num as displayed in the output of qwinsta.
December 3, 2009 at 3:02 pm
Thanks a lot. You saved my time
December 11, 2009 at 3:26 pm
Thank You, You saved the day
January 7, 2010 at 2:49 pm
This brilliant I was about to reboot the server you have just made my work more easier than before.
January 7, 2010 at 4:23 pm
Thank You, very much
February 2, 2010 at 10:12 pm
… or you could actually use the command-line approach to find out who is on the server and reset their connections.
Query:
QWINSTA /SERVER: … will give you each of the connections and their session ID numbers.
Reset:
RWINSTA /SERVER: … will disconnect the specified session ID.
February 2, 2010 at 10:12 pm
… or you could actually use the command-line approach to find out who is on the server and reset their connections.
Query:
QWINSTA /SERVER:servername … will give you each of the connections and their session ID numbers.
Reset:
RWINSTA /SERVER:servername sessionid … will disconnect the specified session ID.
February 9, 2010 at 2:22 pm
This was great!!! This worked if my client was win2k. for xp mstsc /v:servername /admin worked.
thanks Jasvinder
February 24, 2010 at 7:01 am
Hi – wondered if anyone could help me out.
I need to find out how many concurrent client connections Windows Server 2008 can handle as we are currently bringing our hosting in house and thinking of buying a box with windows server 2008 R2 on it.
I understand that this all depends on your set-up but we currently have about 50000 unique visits a day and I need to find out how many unique visitors we could have if we brought our hosting in house.
I have been looking for an answer for about a week now and keep drawing up blanks so any help would be really appreciated.
Thanks,
Mark
March 31, 2010 at 3:42 pm
Many blessings for the /admin entry — that worked for me.
Another thing you can do is bring up a command window
and run:
qwinsta /server:<server name or IP>
This will list whose connected. After finding one that can
be removed, get the entry from the ID column and run:
rwinsta /server:<server name or IP> <ID>
April 9, 2010 at 12:57 pm
It worked this way for me:
mstsc /v:[SERVERIP] /f -console
April 16, 2010 at 11:52 pm
I’m using XP for the client and the remote box is running WIN2000. It’s not working :( It connects but when I input the log in credentials, it gives me the same error.
April 22, 2010 at 9:54 am
Hi,
I got the error message “The terminal server has exceeded the maximum number of allowed connections” while trying to open remote desktop from my desktop (win xp sp3). So i have execute the command “mstsc /v:00.00.00.00 /f -console”. Even though i am getting the same error message. Please suggest me how to fix this problem.
April 26, 2010 at 6:57 pm
It does not work for me…
It will open the RD window however if you already have 2 logged in RD clients you will receive the same error…
Has anyone that is claiming it works actually tried to use this console command code while having 2 users already logged in via RD.. If so it will not work, Maximum 2 exceeded error will still pop up even as Console login…?
mstsc -v:0.0.0.0 -admin This will work to get a 3 login working on Windows Server 2003… the /console login has never worked for me personally…
April 27, 2010 at 3:57 am
It does not work for me either…
Then I do qwinsta /server: it gives me an error “Error [1722]: The RPC server is unavailable”.
I’m trying to shutdown sessions on a Windows 2000 Server.
Any help would be appreciated as the server is in the UK and I am in Australia!
April 29, 2010 at 8:27 am
Tony;
If you have another server, probably on the same domain (mebbe?) you can use the following app;
start -> run -> %SystemRoot%\system32\tsadmin.exe
I’ve found that to be easier than the command line.
Otherwise, you will have to auth to the server first (a net use command works, amongst other things) to be sure your admin account authenticates before you can list/disconnect the remote sessions.
If you need a hand, shoot me an email (nathan.murphy at framegroup.com.au) and I’ll see if I can help. Always willing to assist another Aussie.
May 18, 2010 at 9:28 am
Perfect…Perfect…Perfect :)
I was stuck at my work as I cant have access on the server itself except remotely.
Thanks so much for your support
Best Regards,
M.Mokhtar
May 19, 2010 at 10:42 am
Umm, I think you all are just making this WAY more difficult then it needs to be. Why not just run the WHS Console, click options, then click “Reset the Windows Home Server Console…”???? This works everytime for me and I always just close RDP using the “x”. Sometimes Microcrap builds in solutions, you don’t always have to make it so complicated.
May 28, 2010 at 10:27 pm
In my case I’m running Windows 7 and am having a problem even getting into the WHS Console because of network problems, so I can’t use it to reset the Remote Desktop Connection. I’ve tried several of the suggestions but still get the same message. Anything special needed for Windows 7?
May 29, 2010 at 8:27 am
Are you able to log in at the home server itself or are you running totally headless? If you can log in at the server, run windows update. There has been a lot of work done to make win7 work great with WHS. You will need to copy the “new” connector software from the software folder and install it on the client. If you are having network issues not related to the server then this probably wont work as the connector software needs to “see” the WHS to install. Let me know if I can be of anymore help.
May 31, 2010 at 9:28 pm
The admin console procedure works (Windows Server 2003 R2), thanks a lot! :)
However in order to use the qwinsta and rwinsta commands you need to have network access to the RPC port of the server. It is unfortunately very often blocked by firewalls in order to avoid hacker attacks. So do not count on these two commands in every occasion.
June 1, 2010 at 8:52 am
No, it does not work
July 8, 2010 at 3:22 pm
sometimes it happens
July 18, 2010 at 11:17 am
very very useful information i got here, i had host my site on VPS and almost getting the issue which is described here, and due to which my site got down and i can’t do anything but with this i can again access my VPS .. Thanks a lot
August 9, 2010 at 12:54 pm
hi
i use in server 2003 but problem my rdp user login
my server 55 user login no problem but login 56,57 user not loding user profile error
August 23, 2010 at 12:35 am
Hey it didnt work, just gave me a list of commands.
I replaced “/f -console” “/admin” and it worked!
Thanks heaps!