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

  • The Fsutil file in WindowsThe Fsutil file in Windows
    the fsutil file finds a file by the user name (if disk quotas is enabled), the query allocates the scope to a file, sets the short name to a file, sets the valid data length of the file, sets the data zero for a file, or create a new file.
  • Action Query in Action 2016Action Query in Action 2016
    action queries are queries that perform actions on data, can add, change or delete records.
  • Add Command Prompt to Power User Menu on Windows 10Add Command Prompt to Power User Menu on Windows 10
    on windows 10 build 14971, microsoft replaced command prompt and command prompt (admin) with windows powershell. according to microsoft, this change will bring the best command line experience to users. but in fact, users prefer to use command prompt rather than using powershell.
  • Finger command in WindowsFinger command in Windows
    the finger command displays information about the user or user on the specified remote computer (usually a unix computer) running the finger service or daemon.
  • Multiple choice questions have a Query optionMultiple choice questions have a Query option
    query is a language used in databases and information systems. the following is an invitation to test your knowledge with network administrator through multiple-choice questions below.
  • Openfiles commands in WindowsOpenfiles commands in Windows
    allows administrators to query, display, or disconnect files and folders that have been opened on the system. in addition, this command can also license or disable the maintain objects list system.
  • USER_NAME function in SQL ServerUSER_NAME function in SQL Server
    this article will show you in detail how to use the function to handle the user_name statement in sql server with specific syntax and examples to better visualize and capture the function.
  • Why use Microsoft Power Query for ExcelWhy use Microsoft Power Query for Excel
    if you're looking for a powerful new way to manage data, microsoft excel for windows now has software built in to help you with that, which is microsoft power query. this is a new tool that helps you take control of your spreadsheets more than ever.
  • How to Add and Delete Users Accounts With Command Prompt in WindowsHow to Add and Delete Users Accounts With Command Prompt in Windows
    command prompt, which is essentially windows' version of apple's 'terminal' app, allows you to enter system-altering commands. while most user commands one might enter in command prompt are easier to carry out by simply performing the...
  • TOP command in SQLTOP command in SQL
    in sql, the top statement is used to retrieve n records or x percent records from a table.