• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About Technipages
Windows 10: Find Who is Logged in

Windows 10: Find Who is Logged in

By Mitch Bartlett 19 Comments

If you’re wondering how to find out who is currently logged into a Microsoft Windows 10 computer, there are several ways to proceed. Here are a few common methods you can use from a remote computer or logged into the local computer you are querying.

WhoAmI Command

The “whoami” command displays the user you are currently logged in and using in Windows.

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    whoami
  4. The computer name or domain followed by the username is displayed.

Query User Command

This command allows you to see all users currently logged into the computer.

Locally

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    query user
  4. The computer name or domain followed by the username is displayed.

Remotely

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    query user /server:computername
    Replace “computername” with the actual computer name of the system you are querying.
  4. The computer name or domain followed by the username is displayed.

Task Manager

  1. Right-click the taskbar, then select “Task Manager“.
  2. Select the “Users” tab.
  3. Details on the users logged into the machine are displayed.

WMIC

  1. Hold down the Windows Key, and press “R” to bring up the Run window.
  2. Type “CMD“, then press “Enter” to open a command prompt.
  3. At the command prompt, type the following then press “Enter“:
    WMIC /NODE:"computername" COMPUTERSYSTEM GET USERNAME
    Replace “computername” with the actual computer name of the system you are querying. You can also replace “computername” with the IP address of the system.
    WMIC /NODE:192.168.1.1 COMPUTERSYSTEM GET USERNAME

You Might Also Like

  • XBox One: Appear Offline While Logged On
    XBox One: Appear Offline While Logged On
  • Fix: LastPass Not Staying Logged In
    Fix: LastPass Not Staying Logged In
  • Error: "User username (SessionId=2) could not be logged off. Access is denied."
    Error: "User username (SessionId=2) could not be logged off.…
  • How to Find Out Which CPU I Have in My Computer (Windows)
    How to Find Out Which CPU I Have in My Computer (Windows)
  • How to Find Your Windows 10 Product Key
    How to Find Your Windows 10 Product Key
  • Fix: Windows Cannot Find Powershell.exe
    Fix: Windows Cannot Find Powershell.exe
  • What to Do When You Can't Find Your Screenshots on Windows 10
    What to Do When You Can't Find Your Screenshots on Windows…
  • Windows: Command to Find MAC Address
    Windows: Command to Find MAC Address
  • Find Wi-Fi Password From Windows & macOS
    Find Wi-Fi Password From Windows & macOS

Filed Under: Windows Tagged With: Windows 10

Reader Interactions

Comments

  1. Gerald says

    May 23, 2022 at 10:25 am

    Is there a way to find out this information for a computer that has not been on the domain in a while? I’m trying to find out who is logging into a PC that was put into inventory correctly, but I don’t know when it’s coming online

  2. Jennifer says

    April 10, 2022 at 3:17 am

    ‘query’ is not recognized as an internal or external command,
    operable program or batch file.

  3. Raphael Ferreira says

    February 21, 2021 at 3:02 pm

    Plain, simple, and it works. At least in my case. I used the “query user /server:computername” method, as I needed to know who was logged in to a remote machine name I did not recognize… Then when seeing the username I knew who it was (in this case who the computer belonged to). THANKS! Great tip! R.

  4. Tom says

    February 9, 2021 at 6:03 pm

    “At the command prompt, type the following then press “Enter“:
    query user /server:computername
    Replace “computername” with the actual computer name of the system you are querying.”

    I got: The RPC server is unavailable.

    This did not work for me, but exchanging “computername” with the machine’s IP worked just fine.

  5. idan says

    January 27, 2020 at 6:51 am

    This way only gives you one user ,
    but what if i got more users logged on ?

  6. mveras says

    January 16, 2020 at 9:51 am

    One important distinction that needs to be made here is that the “whoami” command does not return who is logged in. It returns who is running the “whoami” command. Which means that if you are running this command as a different user than whoever is actually logged in (like when you are executing remotely, it is completely useless.

    “query user” on the other hand, returns who is actually logged in regardless who is running the “query user”

    The WMIC command lacks one nice feature that “query user” has: the time the user logged in.

  7. Harry S. Anchan says

    November 28, 2019 at 4:52 pm

    Another easy way that i use. Just right-click on the Task bar or C-A-D, bring up Task Manager and click on the Users tab.

  8. eK says

    October 18, 2019 at 12:37 am

    Worked for me, thank you!

  9. samiuddin says

    September 19, 2019 at 2:41 am

    Great contribution! it helped alot

  10. Phil says

    August 12, 2019 at 11:25 pm

    I tried this and both the remote query and WMIC methods returned the error below in my domain…
    I am guessing this is a windows firewall issue ?

    The RPC server is unavailable.

    Regards, Phil

  11. Jvonne says

    July 9, 2019 at 4:00 am

    Thank you much! Like Noel, other cmds like ‘wmic.exe’ and ‘netsh’ and ‘net user’ would not work for remote PC’s on the network, but the ‘query user’ command worked great for me!

  12. Mohammed Saeed says

    May 17, 2019 at 3:15 pm

    It was very handy. saved my day. Thank you very much,

  13. Jeroen says

    September 10, 2018 at 4:05 am

    yes, very usefull,

    I’m wondering (maybe it will go to far) but is there a way to logout some users, like if you’re going to do an update or so.

    thanks

  14. Noel says

    July 30, 2018 at 9:22 am

    Yes, this did help, and it worked on a Windows 10 PC’s on a domain. Other suggestions by other people such as ‘wmic.exe’ and ‘netsh’ and ‘net user’ would not work for remote PC’s on the network, but the ‘query user’ command worked great for me, thanks a lot.

  15. steelersc says

    July 2, 2018 at 4:04 pm

    Worked well when run against windows server

  16. Tony says

    June 12, 2018 at 8:14 am

    A very helpful page, thank you

  17. Mark says

    August 2, 2017 at 8:22 am

    Tom, did you ever find an answer to this? I’m interested in exactly this, finding out who (if anyone) is logged in before I log in myself. Unfortunately, even if the last user actually logged out, his name will be presented by the prompt for the next login (a “convenience”, I suppose, but it hides whether or not that user is actually still logged in or not).

  18. prerna says

    May 16, 2017 at 1:02 am

    WMIC /NODE:”computername” COMPUTERSYSTEM GET USERNAME
    will return “UserName” string instead of actual logged in user name in windows 10 and widows server 2012

  19. Tom says

    December 22, 2016 at 12:31 pm

    How about from the lock screen? Say if you want to check if anyone else is logged in before logging in to install updates that are going to require a system restart?

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • Windows 11: How to Add Clocks with Different Time Zones
  • Google Assistant: How to Never Miss a Birthday
  • Windows 11: How to Disable Notifications and Ads
  • How to Use Oculus Quest 2 Air Link
  • How to Create an Avatar in the Oculus Quest 2
  • 5 Free and Fun Math Apps for Kids
  • Windows 11: How to Discover What Graphics Card You’re Using
  • How to Change Display Resolution on Windows 10 and 11

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • Windows 95/98
  • Microsoft Windows NT
  • Microsoft Windows
  • Microsoft Windows 95
  • Windows Media Player (WMP)
  • Top 8 Itunes Alternatives for Windows

© Copyright 2022 Technipages · All Rights Reserved · Privacy