Query session
Updated: January 21, 2005
Syntax
Parameters
Remarks
- A user can always query the session to which the user is currently logged on. To query other sessions, the user must have Query Information access permission.
- If you do not specify a session using SessionName, UserName, or SessionID, query session displays information about all active sessions in the system.
- When query session returns information, a less than
(>) symbol is displayed before the current session. Following is
sample output for query session:
C:\>query session SESSIONNAME USERNAME ID STATE TYPE DEVICE >console administrator 0 active wdcon rdp-tcp#1 client1 1 active wdtshare rdp-tcp 2 listen wdtshare 4 idle 5 idle
The less than (>) symbol indicates the current session. SESSIONNAME specifies the name assigned to the session. USERNAME indicates the user name of the user connected to the session. STATE provides information about the current state of the session. TYPE indicates the session type. DEVICE, which is not present for the console or network-connected sessions, is the device name assigned to the session. The comment following session information is from the session profile. Any sessions in which the initial state is configured as DISABLED do not show up in the query session list until they are enabled.
Examples
query session /server:SERVER2
To display information about active session MODEM02, type:
query session MODEM02
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |