The quser (query user) command in Windows

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

(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