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:
- User name.
- The name of the session is active on the rd Session Host server.
- Session ID
- Status of the session (active or disconnected).
- Idle time (number of minutes from key press or last mouse move in session).
- 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:
- The qprocess command in Windows
- Qappsrv (query termserver) command in Windows
- The prnjobs command in Windows
- Prndrvr command in Windows
You should read it
- The reg query command in Windows
- The bootcfg query command in Windows
- Query command in Windows
- The multiple-choice question set has an answer to Query P1
- Qappsrv (query termserver) command in Windows
- Qprocess (query process) command in Windows
- Action Query in Action 2016
- Qwinsta (query session) command in Windows
- Multiple choice questions have a Query option
- Set up Query Criteria in Access 2016
- What do you know about data queries?
- Why use Microsoft Power Query for Excel
Maybe you are interested
This is the culprit that prevents users from updating Windows 11 24H2
How to switch users on the Linux command line
4 reasons why users are looking forward to the Samsung Galaxy S25 Ultra
5 things Pro users may have to give up to switch to iPhone 17 Air
Mozilla quietly adds user tracking feature in new Firefox update
8 Windows 11 features that make users decide to give up Windows 10