Use "Query User" Command

Q

How to use "query user" to find out who is logged in to my Windows 7 computer?

✍: FYIcenter.com

A

If you allow remote logins to your Windows 7 computer, there are other users might be quietly logged in to your computer.

To find out who is currently logged in on your computer, you can use the "query user" command:

C:\fyicenter>query user /?
Display information about users logged on to the system.

QUERY USER [username | sessionname | sessionid] [/SERVER:servername]

  username            Identifies the username.
  sessionname         Identifies the session named sessionname.
  sessionid           Identifies the session with ID sessionid.
  /SERVER:servername  The server to be queried (default is current).

For example:

C:\fyicenter>query user

 USERNAME    SESSIONNAME  ID  STATE   IDLE TIME  LOGON TIME
 joe_tester                2  Disc     42+17:59  10/14/2017 1:31 AM
 jay_writer                3  Disc     25+11:15  11/15/2017 8:25 AM
>fyicenter   rdp-tcp#0     5  Active          .  12/30/2017 10:56 AM

Looks like joe_tester has logged over 2 months ago and disconnected about 42 days ago.

"quser" is alias command of "query user".

 

Use "Query Session" Command

Remote Desktop Services Manager Commands

Managing User Remote Login Sessions

⇑⇑ Windows 7 Security Tutorials

2018-01-13, 234👍, 0💬