Windows server 2000/2003 allows two remote terminal services connections for administrative purposes.  Every once in a while I’ll get the “You exceeded the allowed connection count” message when trying to connect to a server via RDP, because previous sessions were not disconnected correctly.

You can use either of the following methods to remotely disconnect Terminal Server sessions.

Table of Contents

    Method 1

    You can normally run the Terminal Services Manager program on another server, or even from a Windows XP workstation, to disconnect Terminal Services connections by clicking StartRun and then typing

    %SystemRoot%\system32\tsadmin.exe

    This will launch the local copy of Terminal Services Manager.  Next right click on All Listed Servers and select Connect to Computer.  Type in the name or IP address of the server you wish to manage.

    How to Remotely Disconnect a Terminal Services Session image 1

    Select your server from the left pane, then select the Sessions tab from the right pane.  Right click on the session you wish to disconnect and select Disconnect.

    How to Remotely Disconnect a Terminal Services Session image 2

    You should now be able to login to the target server via Terminal Services.

    Method 2

    Authenticate to the server you wish to manage.  You can easily accomplish this by mapping a network drive to a share on the target server.  Start a command prompt and type

    qwinsta /server:yourservername

    where yourservername is the name or IP address of the server you wish to manage.

    In my case I ran qwinsta /server:10.0.0.2

     

    How to Remotely Disconnect a Terminal Services Session image 3

    You can see the Administrator account is logged into session 0 and the admin account is logged into session 1.  To disconnect the admin session with ID=1 I’ll run the following from a command prompt:

    rwinsta ID /server:yourservername

    where ID is the process ID of the session you wish to terminate, and yourservername is the name or IP address of the server you wish to manage.

    In my case I ran rwinsta 1 /server:10.0.0.2

    How to Remotely Disconnect a Terminal Services Session image 4

    I again ran qwinsta /server:10.0.0.2 which verified session 1 had been disconnected.  I confirmed that I was once again able to login to Terminal Services.

    Leave a Reply

    Your email address will not be published. Required fields are marked *