After you get the IP addresses of some computers on my network. You can use command line tool like PsExec, PsLogged which can take the IP Address
as input and find out the username of the currently logged in user. Here that one of that tool, PsLoggedOn.
|
You can determine who is using resources on your local computer with
the "net" command ("net session"), however, there is no built-in way to
determine who is using the resources of a remote computer. In addition,
NT comes with no tools to see who is logged onto a computer, either
locally or remotely. PsLoggedOn is an applet that displays both
the locally logged on users and users logged on via resources for
either the local computer, or a remote one. If you specify a user name
instead of a computer, PsLoggedOn searches the computers in the network neighborhood and tells you if the user is currently logged on.
PsLoggedOn's definition of a locally logged on user is one that has their profile loaded into the Registry, so PsLoggedOn
determines who is logged on by scanning the keys under the HKEY_USERS
key. For each key that has a name that is a user SID (security
Identifier), PsLoggedOn looks up the corresponding user name and displays it. To determine who is logged onto a computer via resource shares, PsLoggedOn uses the NetSessionEnum API. Note that PsLoggedOn will show you as logged on via resource share to remote computers that you query because a logon is required for PsLoggedOn to access the Registry of a remote system.
You can use command below
wmic.exe /node:IP-or-HostName ComputerSystem Get UserName
Example
wmic.exe /node:172.28.1.100 ComputerSystem Get UserName
Ouput :
UserName
DOMAIN\User
Download PsLoggedOn