Skip to content
Home » Determine user logged into a computer via command line

Determine user logged into a computer via command line

In a multi-user environment, it’s essential to know who is logged into a computer for various reasons, such as troubleshooting, security, and user management. In addition, many network utilities or appliances identify computers by hostname or IP address. Our guide will provide you with step-by-step instructions on how to determine what user is logged into a remote computer via command line, enabling you to efficiently manage your users and troubleshoot any issues that may arise. 


The fastest way we’ve found to do accomplish this is to use PSLoggedOn.exe which is part of the sysinternals suite.

First thing you need to do, obviously, is to download that and put it somewhere easy to get to via command line.

Open Command Prompt, use the “CD” command to get to the directory where you saved the sysinternals files, then enter the following command:

psloggedon.exe \\{Fully-Qualified Hostname or IP address}

Assuming you’re on the same LAN/network and are using an Active Directory domain, this command should quickly return the name of the user that is logged on and the time they logged on.


Thank you for visiting our website and we hope that our instructions for determining which user is logged into a computer via command line has been helpful to you. If you found our guide informative and useful, please consider sharing it with your friends and colleagues who might also benefit from this knowledge. Your support in spreading the word about our website is greatly appreciated and will help us continue to provide valuable resources to the world. Thank you again for your time and we look forward to your continued support.