Question Locked

Looking for computers with more than one (1) domain login account

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am looking for a way to remotely query my network (from my machine) to find computers that have more then one (1) login account. I am only looking for domain logins, not local. Is it possible to use 'Net User', and if so, what would the syntax be (i.e. Net User "computer name", etc). Thanks!!

3 replies

by knohr

strComputer = "rkc-f467191"
strTestString = "/" & strComputer & "/"

Set colGroups = GetObject("WinNT://" & strComputer & "/Administrators")

For Each objUser In colGroups.Members
If InStr(objUser.AdsPath, strTestString) Then
Wscript.Echo "Local user: " & objUser.Name
Else
Wscript.Echo "Domain user: " & objUser.Name
End If
Next

When running the above script, I get the message,

Runtime error '424'; Object required

What am I doing wrong.

This discussion is closed to new replies.