Query user
Displays information about user sessions on the terminal server.
Syntax
Query user[{UserName|SessionName|SessionID}] [/Server:ServerName]
Parameters
UserName
The login name of the user to be queried.
SessionName
The name of the session to be queried.
SessionID
ID of the session to be queried.
/Server:ServerName
Specify the terminal server to query. Otherwise, use the current Terminal Server.
/?
Display help at a command prompt.
Note
• |
If a specific user logs on to a specific terminal server, you can use this command to search.Query userReturn the following information:
• |
User Name |
• |
Session name on the Terminal Server |
• |
Session ID |
• |
Session status (active or disconnected) |
• |
Idle Time (the number of minutes that have elapsed since the last press or mouse move in the session) |
• |
User logon date and time |
|
• |
To useQuery userYou must have full control permissions or special access permissions for querying information. |
• |
If you do not specify a user name, session name, or session ID, useQuery userReturns a list of all users logging on to the server. You can also useQuery sessionDisplays the list of all sessions on the server. |
• |
WhenQuery userWhen the information is returned, the current session is preceded by a smaller sign (> ). |
• |
Only used on a remote serverQuery userOnly required/ServerParameters. |
Example
To display information about all users logging on to the system, type:
Query user
To display information about USER1 on server Server 1, type:
Query user USER1/server: SERVER1