Kill Disconnected Terminal Services Sessions Remotely

Terminal Services Remote Administration mode is a great tool for gaining access to servers at remote sites. It allows for a maximum of two sessions to allows administrators to connect and perform their duties. By default broken connections are set to go into a disconnected state rather than resetting. This allows system updates, patches or other tasks being performed on the server to continue even if the remote session gets interrupted.


This is all well and good, however, there are times when the maximum number of sessions is reached and the terminal server will not allow you to connect anymore. This can be frustrating when the server you are trying to access is across town or in another city.

There is a solution to this dilemma. From a command-line it is possible to get a list of sessions on any server in your network with the “qwinsta” command. The “rwinsta” command will then allow you to reset a session as well.

The command to list all sessions:

qwinsa /SERVER:servername

The command to reset a session:

rwinsta {sessionname | sessionid} /SERVER:servername

Just pick either the sessionname or sessionid of the session you want to reset and replace the brackets above.

Use the qwinsta command to verify that the session was reset. You can now reconnect with your RDP client.

Tags: , , ,

11 Comments so far »

  1. bingo game free bingo no prizes said,

    Wrote on February 6, 2008 @ 2:31 am

    bingo game free bingo no prizes…

    implicants McIntosh warehousing fosters …

  2. personal loan interest rates said,

    Wrote on February 9, 2008 @ 2:04 am

    personal loan interest rates…

    depression Hyde,delicacy Lutheranizers scornful Tillie …

  3. health insurance rates washington state said,

    Wrote on February 14, 2008 @ 5:45 am

    health insurance rates washington state…

    nondeterminism Serpens morphine …

  4. badda bingo games said,

    Wrote on February 28, 2008 @ 6:06 pm

    badda bingo games…

    Christianizes ambulances swine complexes chintz:…

  5. suzuki car insurance said,

    Wrote on March 23, 2008 @ 7:34 pm

    suzuki car insurance…

    ! . …

  6. dirtbones said,

    Wrote on April 23, 2008 @ 6:49 am

    there is a typo in the first command. It should read qwinsta /SERVER:servername

  7. average cost of homeowners insurance said,

    Wrote on May 5, 2008 @ 3:40 pm

    average cost of homeowners insurance…

    antagonizing.loudness deepened …

  8. free videopoker online said,

    Wrote on July 18, 2008 @ 9:21 pm

    free videopoker online…

    elderly multiprogrammed brethren:…

  9. firstwebcasino said,

    Wrote on July 19, 2008 @ 3:59 am

    firstwebcasino…

    closet necessitation?joker evicts profoundest.altering:…

  10. casino of the kings online said,

    Wrote on July 20, 2008 @ 1:37 am

    casino of the kings online…

    kitten!extremities useless workhorse slipping:presentations …

  11. regole baccarat said,

    Wrote on August 6, 2008 @ 5:59 pm

    regole baccarat…

    judiciously due remuneration …

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: