Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How Can I remove/clear all RDC logged users in a windows machine?

Note: I have an Administrator RDC account

EDIT: I'm working with Windows Server 2003

Everytime I want to connect remotely, It prompts that the terminal server has exceeded the maximum number of allowed connections. I tried to clear all sessions using qwinsta/quser and reset session method, but ended up with nothing.

share|improve this question
You should provide more information, like which Windows version and a concrete use case. – Simon Apr 22 '13 at 6:19
@Simon See my edit above. – lexeRoy Apr 22 '13 at 6:30
up vote 1 down vote accepted

To connect to the Terminal Server despite the limited connections, what you can do is to connect to the server with the /admin switch. To do this, launch mstsc as follows:

mstsc /v:n.n.n.n /admin

Replace n.n.n.n with the IP of the server and you’re good to go. Once connected to the server, use Task Manager to log off the sessions that are no longer used.

To do this, select the session you wish to disconnect and click Logoff. Note that this will effectively log off the session and closes all windows still open in that session!

Once these steps have been completed, log your current session off and you should be able to reconnect to the server without using the /admin switch.

share|improve this answer

Given that the often-repeated solution of using mstsc with the /admin switch doesn't work, we need an actual solution.

The actual solution

We have to remotely log a user off. You can do this using the reset command. In this example the server we want to kick someone off of is called tyderian

  • Establish a connection to the server

    C:\Users\ian>net use /user:ian \\tyderian
    The command completed successfully.
  • List the existing sessions on the server

    C:\Users\ian>query session /server:tyderian
     SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
     console           superdude                 0  Active  wdcon
     rdp-tcp                                 65536  Listen  rdpwd
     rdp-tcp#61        Ian                       2  Active  rdpwd
                       superdude                 5  Disc    rdpwd
  • Pick someone to boot off the server, and boot them off the server

    C:\Users\ian>reset session 5 /server:tyderian

And viola, you can now RDP to tyderian.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .