text
stringlengths
0
4.23k
Remarks
To use this command, you must have Full Control permission or special access permission.
If you don't specify a user using the <username>, <sessionname>, or sessionID parameters, a list of all users who are logged on to the server is returned. Alternatively, you can also use the query session command to display a list of all sessions on a server.
When quser returns information, a greater than (>) symbol is displayed before the current session.
(>)
Examples
To display information about all users logged on the system, type:
quser
To display information about the user USER1 on server Server1, type:
quser USER1 /server:Server1
qwinsta
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
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.
Syntax
qwinsta [<sessionname> | <username> | <sessionID>] [/server:<servername>] [/mode] [/flow] [/connect] [/counter]
Parameters
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.
<sessionname>
<username>
<sessionID>
<servername>
Remarks
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:
Examples
To display information about all active sessions on server Server2, type:
qwinsta /server:Server2
To display information about active session modeM02, type:
qwinsta modeM02
rd
Deletes a directory.
The rd command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE).
Note
This command is the same as the rmdir command.
Syntax
rd [<drive>:]<path> [/s [/q]]