How to List Currently Logged-on Users on Windows

In this Guide:

Knowing which users are currently logged on to a Windows machine can be helpful for system administrators, IT support, and security purposes. This guide provides several methods to list logged-on users using built-in Windows tools and via commands.

Why Check Currently Logged-on Users?

  1. Monitor Active Sessions: Identify who is using the system.
  2. Troubleshoot Issues: Diagnose login-related problems or performance bottlenecks.
  3. Security Checks: Ensure no unauthorized access has occurred.

Methods to List Currently Logged-on Users

1. Using Task Manager

  1. Press Ctrl + Shift + Esc to open the Task Manager.
  2. Click on the Users tab.
  3. You will see the list of logged-on users, their session types, and their statuses (e.g., active or disconnected).

2. Using Command Prompt

  1. Open Command Prompt:
    • Press Win + R, type cmd, and press Enter.
  2. Use the following commands:
    • query user: Displays the list of active sessions and users.
    • whoami: Shows the username of the current user.
    • net user: Lists all user accounts on the system, though it does not indicate logged-on users.

3. Using PowerShell

  1. Open PowerShell:

    • Press Win + R, type powershell, and press Enter.
  2. Run the following command:

    
    Get-WmiObject -Class Win32_ComputerSystem | Select-Object -ExpandProperty UserName
    
    • This command shows the currently logged-in user on the console session.

4. Using Event Viewer

  1. Press Win + R, type eventvwr, and press Enter.
  2. Navigate to:
    • Windows Logs > Security.
  3. Look for Event ID 4624 (logon events) to see who logged in and Event ID 4647 for logoff events.

5. Using Sysinternals Tools

  1. Download and install Sysinternals tools from Microsoft (if not already installed).
  2. Use the PsLoggedOn tool:
    • Open Command Prompt.
    • Run psloggedon to list currently logged-on users locally and remotely.

6. Using Remote Desktop Services (RDS)

  • If using an RDS server or session host, use the Remote Desktop Services Manager or qwinsta command to list users logged into terminal sessions:

    
    qwinsta
    

 

Frequently asked questions: