text stringlengths 0 4.23k |
|---|
/? |
Displays help at the command prompt. |
<username> |
<sessionname> |
<sessionID> |
<servername> |
Remarks |
To use this command, you must have Full Control permission or special access permission. |
If you don't specify a user using the <username>, <sessionname>, or sessionID parameters, a list of all users who are logged on to the server is returned. Alternatively, you can also use the query session command to display a list of all sessions on a server. |
When query user returns information, a greater than (>) symbol is displayed before the current session. |
(>) |
Examples |
To display information about all users logged on the system, type: |
query user |
To display information about the user USER1 on server Server1, type: |
query user USER1 /server:Server1 |
query commands |
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 |
Displays information about processes, sessions, and Remote Desktop Session Host servers. To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server. |
Syntax |
query process |
query session |
query termserver |
query user |
Parameters |
Parameter |
Description |
query process |
Displays information about processes running on an Remote Desktop Session Host server. |
query session |
Displays information about sessions on a Remote Desktop Session Host server. |
query termserver |
Displays a list of all Remote Desktop Session Host servers on the network. |
query user |
Displays information about user sessions on a Remote Desktop Session Host server. |
quser |
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 |
Displays information about user sessions on a Remote Desktop Session Host server. You can use this command to find out if a specific user is logged on to a specific Remote Desktop Session Host server. This command returns the following information: |
Name of the user |
Name of the session on the Remote Desktop Session Host server |
Session ID |
State of the session (active or disconnected) |
Idle time (the number of minutes since the last keystroke or mouse movement at the session) |
Date and time the user logged on |
Note |
This command is the same as the query user command. To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server. |
Syntax |
quser [<username> | <sessionname> | <sessionID>] [/server:<servername>] |
Parameters |
Parameter |
Description |
<username> |
Specifies the logon name of the user that you want to query. |
<sessionname> |
Specifies the name of the session that you want to query. |
<sessionID> |
Specifies the ID of the session that you want to query. |
/server:<servername> |
Specifies the Remote Desktop Session Host server that you want to query. Otherwise, the current Remote Desktop Session Host server is used. This parameter is only required if you're using this command from a remote server. |
/? |
Displays help at the command prompt. |
<username> |
<sessionname> |
<sessionID> |
<servername> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.