Qwinsta (query session) command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The qwinsta command displays information about sessions on the Remote Desktop Session Host server (RD Session Host).
This command is equivalent to the query session.
The query session command
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The query command displays information about sessions on the Remote Desktop Session Host server (RD Session Host).This list includes information not only about active sessions but also about other sessions running on the RD Session Host server.To learn more about how to use this command, see the example section below.
Syntax the query session
query session [| | ] [/ server:] [/ mode] [/ flow] [/ connect] [/ counter]
Parameter query session
Parameters
Describe
Specify the name of the session you want to query.
Specify the username of the user you want to query.
Specify the ID of the session you want to query.
/ server:
Specify the RD Session Host host you want to query.If you do not specify this parameter, the current rd Session Host server will be used by default.
/ mode
Show current line settings.
/ flow
Show current flow control settings.
/ connect
Displays the current connection settings.
/ counter
Displays the current counter information, including the total number of sessions created, the disconnection session, and the reconnection session.
/?
Show help at thecommand prompt.
Note the query session
A user can always query the session that user is currently logged in to.To query other sessions, users must have access to special query information.
If you use the query session without specifying parameters , or , the user query will display information about all the currently active sessions in the system.
When the query user returns information, a larger sign icon (>) will be displayed before the current session.The following is the result of returning the form of the user query:
C:> query session SESSIONNAME USERNAME ID STATE TYPE DEVICE console Administrator1 0 active wdcon rdp-tcp # 1 active1 1 active wdtshare rdp-tcp 2 wdtshare listen 4 idle 5 idle
Larger icon ( > ) indicates the current session. SESSIONNAME specifies the name assigned to the session. USERNAME indicates the username of the user connected to the session. STATE provides information about the current state of the session. TYPE said what kind of session this is. DEVICE (parameter not in the control panel or network connected session) is the device name assigned to the session.Comment Line following session information is from the session profile.Any session in which the initial state when configured as DISABLED will not be displayed in the query session list until they are enabled (ENABLED).
For example, the user query
To display information about all active sessions on the server with SERver2, enter:
query session / server: SERver2
To display information about the active session named modeM02, type:
query session modeM02
See more:
- The qprocess command in Windows
- Qappsrv (query termserver) command in Windows
- The quser (query user) command in Windows
- The pubprn command and the pushprinterconnections command in Windows
You should read it
May be interested
- The LIKE command in SQLin sql, the like command is used to compare a value with similar values by using wildcards.
- The command changes user in Windowsthe change user command changes the installation mode for the remote desktop session host server (rd session host).
- The multiple-choice question set has an answer to Query P1in the previous articles, the network administrator sent you read query queries. following the series on this topic, below is the next part of the questionnaire, invite readers to try.
- Color command in Windowsthe color command changes the foreground and background colors in the command prompt window for the current session. if used without parameters, the color command restores the default foreground and background colors of the command prompt window.
- Action Query in Action 2016action queries are queries that perform actions on data, can add, change or delete records.
- Multiple choice questions have a Query optionquery is a language used in databases and information systems. the following is an invitation to test your knowledge with network administrator through multiple-choice questions below.
- Openfiles commands in Windowsallows administrators to query, display, or disconnect files and folders that have been opened on the system. in addition, this command can also license or disable the maintain objects list system.
- What is Session Hijacking? Common Session Hijacking Attackssession hijacking is the act of intentionally taking control of a user's web session.
- Why use Microsoft Power Query for Excelif you're looking for a powerful new way to manage data, microsoft excel for windows now has software built in to help you with that, which is microsoft power query. this is a new tool that helps you take control of your spreadsheets more than ever.
- TOP command in SQLin sql, the top statement is used to retrieve n records or x percent records from a table.