Events
29 Apr, 2 pm - 30 Apr, 7 pm
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Displays information about sessions on a Remote Desktop Session Host server. The list includes information not only about active sessions but also about other sessions that the server runs.
Note
This command is the same as the query session command. To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.
qwinsta [<sessionname> | <username> | <sessionID>] [/server:<servername>] [/mode] [/flow] [/connect] [/counter]
Parameter | Description |
---|---|
<sessionname> |
Specifies the name of the session that you want to query. |
<username> |
Specifies the name of the user whose sessions you want to query. |
<sessionID> |
Specifies the ID of the session that you want to query. |
/server:<servername> |
Identifies the rd Session Host server to query. The default is the current server. |
/mode | Displays current line settings. |
/flow | Displays current flow-control settings. |
/connect | Displays current connect settings. |
/counter | Displays current counters information, including the total number of sessions created, disconnected, and reconnected. |
/? | Displays help at the command prompt. |
A user can always query the session to which the user is currently logged on. To query other sessions, the user must have special access permission.
If you don't specify a session using the <username>, <sessionname>, or sessionID parameters, this query will display information about all active sessions in the system.
When qwinsta returns information, a greater than (>)
symbol is displayed before the current session. For example:
C:\>qwinsta
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console Administrator1 0 active wdcon
>rdp-tcp#1 User1 1 active wdtshare
rdp-tcp 2 listen wdtshare
4 idle
5 idle
Where:
To display information about all active sessions on server Server2, type:
qwinsta /server:Server2
To display information about active session modeM02, type:
qwinsta modeM02
Events
29 Apr, 2 pm - 30 Apr, 7 pm
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up now