2021-10-12 07:32:22 +01:00
|
|
|
# query
|
|
|
|
|
2024-04-18 05:04:00 +01:00
|
|
|
> Display information about user sessions and process.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/query>.
|
2021-10-12 07:32:22 +01:00
|
|
|
|
|
|
|
- Display all user sessions:
|
|
|
|
|
|
|
|
`query session`
|
|
|
|
|
|
|
|
- Display the current user sessions on a remote computer:
|
|
|
|
|
|
|
|
`query session /server:{{hostname}}`
|
|
|
|
|
|
|
|
- Display logged in users:
|
|
|
|
|
|
|
|
`query user`
|
|
|
|
|
|
|
|
- Display all user sessions on a remote computer:
|
|
|
|
|
|
|
|
`query session /server:{{hostname}}`
|
|
|
|
|
|
|
|
- Display all running processes:
|
|
|
|
|
|
|
|
`query process`
|
|
|
|
|
|
|
|
- Display running processes by session or user name:
|
|
|
|
|
|
|
|
`query process {{session_name|user_name}}`
|