Is there any equivalent of who command in Windows? How can I view all the logged in users and sessions in the CMD terminal or powershell?
PS C:\> quser
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
>jeffrey rennie console 1 Active none 4/20/2017 2:40 PM
PS C:\Users\Jeffrey Rennie> quser -h
Invalid parameter(s)
Display information about users logged on to the system.
QUERY USER [username | sessionname | sessionid] [/SERVER:servername]
username Identifies the username.
sessionname Identifies the session named sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
PS C:\>
Windows don't have command equivalent to "WHO" command of linux, but you can use below commands.
use quser to check active settions.
for users check you can use command "net user"
and to check active remote sessions you can use command "netstat". check port 3389 if active. 3389 is use for RDP (Remote Desktop Protocol). it will not tell you the users but will show you the ip list active on port 3389 (remote users).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With