Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 view, who is currently connected to a server (Windows 2012) with a remote desktop client? I am myself connected to this server via RDP.

This question offers a solution to get IP addresses with established connections. I would be interested in a list of users or their sessions and when these sessions were active the last time.

share|improve this question
up vote 11 down vote accepted

You can type "Query User" into a command prompt on the remote machine to get a very quick look

share|improve this answer
1  
I'm accepting this solution, as it shows the logon and idle times directly. This is exactly what I had hoped. – gpinkas Feb 22 at 14:15
3  
You can shorten this to quser. – Neil Feb 22 at 17:54

You can see in the Task manager users Tab

share|improve this answer
    
Ah, I was fearing it could be so easy I have it overlooked – gpinkas Feb 22 at 13:56

Run the "qwinsta" command on the server, or with the /server:servername switch.

>qwinsta /?
Display information about Remote Desktop Sessions.

QUERY SESSION [sessionname | username | sessionid]
              [/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER] [/VM]

  sessionname         Identifies the session named sessionname.
  username            Identifies the session with user username.
  sessionid           Identifies the session with ID sessionid.
  /SERVER:servername  The server to be queried (default is current).
  /MODE               Display current line settings.
  /FLOW               Display current flow control settings.
  /CONNECT            Display current connect settings.
  /COUNTER            Display current Remote Desktop Services counters informati
on.
  /VM                 Display information about sessions within virtual machines
.

You can also reset an RDP session with the "rwinsta" command:

>rwinsta /?
Reset the session subsytem hardware and software to known initial values.

RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]

  sessionname         Identifies the session with name sessionname.
  sessionid           Identifies the session with ID sessionid.
  /SERVER:servername  The server containing the session (default is current).
  /V                  Display additional information.
share|improve this answer
    
Ooh - I can't believe I've never seen this one – Dan Feb 22 at 13:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.