Find specific user account on multiple machines on the network

Is there any sort of script that will allow me to scan all machines on the network for a specific user account?
Who is Participating?
LongbowConnect With a Mentor Commented:
Set WshShell = WScript.CreateObject("WScript.Shell")
sDomain       = "IDEAL"
Set oDomain       = GetObject("WinNT://" & sDomain)
oDomain.Filter       = Array("Computer")
For Each oADobject In oDomain
      WScript.Echo oADobject.Name
      WshShell.Run "cmd /k psloggedon -d " & sDomain & " \\" & oADobject.Name & " >>c:\log.txt",1, true

Psloggedon.exe can be found in the PSTools 2.1
Psloggedon.exe /? for the syntax
You can also use the redirection, the | pife followed by a Find command
Psloggedon will check each PC's registry.
When a PC is closed it will takes more time before checking the Next PC.
Wscript.Echo can be removed from the script.
As said above - psloggedon. Just enter:

psloggedon <username>

Go get a coffee and it'll be done when you get back. If you have a lot of machines then you may want to go for lunch! It can be pretty slow. A better option is to track the user logons using the login script. Simply add the line

@echo %USERNAME% logged onto %COMPUTERNAME% at %TIME% on %DATE% >> \\<server>\<public writeable share>\logons.txt

Every logon is now tracked in the logons.txt file.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.