If you are prevented from logging on to your server via RDP and receive a message that the maximum number of connections have been exceeded, see steps below to login to the special session to then disconnect the other user sessions:
1. Open Command Prompt on your local windows computer
2. Type: mstsc /admin
3. Hit ‘Enter’ key and login
4. This will open a new session enabling you to log off other sessions.
5. Open task manager, go to the users tab and log off idle or disconnected users
The special session you are using to login has restrictions. Once you have logged off the other users, you should log back into the sever in the normal way.
Remember that remote desktop sessions are closed out from the server if the user Logs Off from the server and not when they simply close the session from clicking the X in the upper corner.
To configure session settings on a windows 2008R2 server with Remote Desktop Services role installed, go to RD Session Host Configuration, RDP-Tcp properties, Sessions tab, and enter value to end a disconnect session after a specific period of time, end an idle session, etc. (tsconfig.msc also opens the RD Session Host Configuration window). More details can be found here: http://technet.microsoft.com/en-us/library/cc754272.aspx