The quser (query user) command in Windows

(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)

The quser command displays user session information on the Remote Desktop Session Host server (rd Session Host).

This command is equivalent to the user query.

The user query

(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)

The query user command displays user session information on the Remote Desktop Session Host server (rd Session Host).To learn more about how to use this command, see the example section below.

Syntax user query

 query user [| | ] [/ server:] 

The user query parameter

Parameters

Describe

 

Specify the username of the user you want to query.

 

Specify the name of the session you want to query.

 

Specify the ID of the session you want to query.

/ server:

Specify the host rd Session Host you want to query.If you do not specify this parameter, the current rd Session Host server will be used by default.

/?

Show help at thecommand prompt.

Note the user query

You can use this command to find out if a particular user is logged into a rd Session Host server.The user query returns the following information:

  1. User name.
  2. The name of the session is active on the rd Session Host server.
  3. Session ID
  4. Status of the session (active or disconnected).
  5. Idle time (number of minutes from key press or last mouse move in session).
  6. The date and time the user logged into the server.

In order to use the query user command, you must have full control or special access to the query information.

If you use the user query without specifying parameters , or, a list of all users logged into the server will be returned. In addition, you can also use the user query to display a list of all sessions on the server.

When the query user returns information, a larger sign icon (>) will be displayed in front of the current session.

The parameter / server is only required if you use the query user command from a remote server.

For example, the user query

To display information about all users logged in on the system, enter:

 query user 

To display information about a user named USER1 on the server named SERver1 , type:

 query user USER1 / server: SERver1 

See more:

  1. The qprocess command in Windows
  2. Qappsrv (query termserver) command in Windows
  3. The prnjobs command in Windows
  4. Prndrvr command in Windows
4.1 ★ | 42 Vote

May be interested

  • Diskshadow command in WindowsPhoto of Diskshadow command in Windows
    by default, the diskshadow command uses an interactive command interpreter, similar to diskraid or diskpart. the diskshadow command also includes a scriptable mode (writeable mode).
  • The certreq command in WindowsPhoto of The certreq command in Windows
    certreq can be used to request a certificate from a certificate authority (ca), in order to receive a response to a previous request from a ca, creating a new request from the .inf file.
  • Diskperf command in WindowsPhoto of Diskperf command in Windows
    the diskperf command is included in windows xp, windows server 2003, windows server 2008, windows vista, windows server 2008 r2, and windows 7 used to enable or disable physical or logical disk performance counters on machines computer running windows 2000.
  • Qwinsta (query session) command in WindowsPhoto of Qwinsta (query session) command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Query command in WindowsPhoto of Query command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Rd command in WindowsPhoto of Rd command in Windows
    the rd command helps delete a directory