Right now I use a powershell script to see the currently logged in users. But I don't see if their session is idle, active or inactive. I can see when the session was started, that's it. Is there an easy way to see how many users are currently logged in to the server I am logged in and see their status? It should not be remotely executed. I would like to avoid third party tools if possible.

7 Answers 7


Use the query user command

Query User Command


Open the Task-Manager and see the users tab. There you will find a list of users and their status.


  • thanks, but this status is not "correct" it's empty while the cmd query user shows me "active" May 26, 2014 at 10:43

"quser" command will give you the active now users

the same result will give you the "qwinsta" command

Get-WMIObject -class Win32_ComputerSystem -ComputerName | Select-Object UserName

where is the IP of the server

  • This only seems to return 1 user for me.
    – Tahlor
    Mar 29, 2021 at 17:10
  • Worth noting that this will only return console logins, and not RDP sessions.
    – Panki
    May 2, 2022 at 13:54

Use quser or query user to check users connected


query user

quser or query user

Use qwinsta or query session to check sessions connected


query session

enter image description here


Also you can use the "UserLock" application to see which users logged in. By this 3rd party tool you can manage the session of the users as well as remote desktop sessions. It is a great tool in this case. I suggest you try this tool.


Its easy in Server 2016 when you are in a session:

Click the search glass bottom left on task bar

Type gateway in the box and this should bring up "Remote Desktop Gateway Manager"; select it.

Click on the ">" next to the RDS server you want to view (RDS-01) for most I guess, then select the monitoring folder

You can now see who is logged on, how long for, since what time and can disconnect them or set connection limits.

Please note you probably need certain admin rights to do this, but it works for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .