Forrest logo
back to the query tool

query:tldr:6193d

query: Display all user sessions on a remote computer.
$ query session /server:${hostname}
try on your machine

The command "query session /server:${hostname}" is used to retrieve information about active sessions on a specified remote server.

Here is the breakdown of each component:

  • "query session": This is the command itself. It is a Windows command-line utility that displays information about sessions on a local or remote system.

  • "/server:${hostname}": This part specifies the remote server for which the session information is requested. The "${hostname}" is a placeholder that you need to replace with the actual hostname or IP address of the server you want to query.

When you run this command, it will connect to the specified remote server and retrieve a list of active sessions. Session information typically includes details such as username, session ID, state, and idle time. This command is often used by system administrators to monitor active sessions on remote servers.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the query tool