Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Who command in windows

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?

like image 706
nPcomp Avatar asked Jun 17 '26 10:06

nPcomp


2 Answers

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:\>
like image 127
Jeffrey Rennie Avatar answered Jun 19 '26 01:06

Jeffrey Rennie


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).

like image 44
aayushkamboj Avatar answered Jun 18 '26 23:06

aayushkamboj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!