Link to home
Start Free TrialLog in
Avatar of cadnyc
cadnycFlag for United States of America

asked on

Clear Terminal Server Has Exceeded the Maximum Number of Allowed Connections??

does anyone know how i can clear all the RDP connections on the windows 2003 server?

ASKER CERTIFIED SOLUTION
Avatar of Brian Pierce
Brian Pierce
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use start run tsadmin to check and logoff/reset sessions. To get on, you can try start run mstsc /admin /console to connect to a console session
From http://ts.veranoest.net/ts_faq_administration.htm#reset_sessions - try this in a batch file@
    REM ** Disable new logons
   change logon /disable
   REM ** Throw out all existing sessions by resetting the listener session
   for /f "tokens=2" %%i in ('qwinsta ^| find /i "listen"') do echo y | rwinsta %%i
   REM ** Maintenance jobs like backup comes here
   REM ** start /wait ensures that this job waits until the command
   REM ** is executed completely before going on to the next command
   start /wait <your maintenance command comes here>
   REM ** Maintenance is finished. Let users in again
   change logon /enable

(this obviously is structured to allow you to pause and run a task before re-enabling the logins- the important bit is line 4

Hope that helps.
The easiest way to clear the RDP sessions is to log into the specific server with an Admin account (Domain or Local), start the Task Manager (right-click taskbar and select task manager) and then go into the Users tab.  From there you can log off all the other RDP sessions.

If you can't log in because it is a non-terminal server and both admin logins are used, then you will need to do it remotely.  To accomplish that, you will need the Windows 2003 AdminPak installed for XP/2003 or Remote Server Administration Tools (RSAT) for Vista/Win7/2008.

In XP/2003 (after tools install)
-Open Administrative Tools from the Control Panel
-Look for and open Terminal Services Manager
-Connect to the problem server
-Find the logins and log them out

In Vista/Win7/2008 (after tools install)
-Open Administrative Tools from the Start Menu
-Look for Remote Desktop Services Folder
-Select Remote Desktop Services Manager
-Connect to the problem server
-Find the logins and log them out

Note that the RSAT install requires you to go into Add Windows Components and add it from there, after a download.  The AdminPak install for XP/2003 does not require this step.

Jimmy