How do you find out who is logged on to remote windows machines?
I'm using psloggedon at the moment, but it gives me only one computer at a time.
psloggeon \\172.21.0.5
Is there a better way how to scan a whole subnet ? Preferably some GUI application.
not a GUI, but:
will do a scan from 172.21.0.2-254. You can also nest:
This will scan the 172.21.{16-31}.x subnets.
I found this script. It scans a whole domain and gives you a nice output (computer name and user name).
whoisloggedinwhere.bat > users.txt
This script uses PsLoggedOn.
Try
nbtstat -a <computername>
I write the user name into the computer description property using a logon script, which lets me see everything in AD Users & Computers, do searches on it, and so on. Very handy.
If the servers are running Terminal Services, you can use Terminal Services Manager to view the servers in a domain and who is logged on to them. It is GUI and can be found under
qwinsta is another dos command, but it'll still only give you one at a time...
You can detect a user being locally logged on to a workstation by querying WMI through the following PowerShell script. It returns the name of whoever is logged on locally or the empty string.
I'm not sure where I got it but I have this code laying around that shows users on a machine. You can wrap this in a for each loop to scan a bunch of machines. I would say that if you want to know who's logged on to a system the simplest way is to turn on login auditing and look at (or query) the security log. Here's the code to see who's on at any given moment:
I'm surprised nobody has mentioned loggedon2 yet, which I've been using for quite a few years. It's the GUI implementation you asked for and is available here.