I have a txt file with a list of servers. I'm looking for a script that I can run that will go out to all the servers on the list and return all users and groups in the local Administrators group. Does anyone know of an easy way to accomplish this? Thanks!
Asked
Active
Viewed 281 times
3 Answers
1
You should use a powershell script. They have pre-made scripts on some sites.

djangofan
- 4,182
- 10
- 46
- 59
-
You could use PowerShell but it's hardly a requirement. – John Gardeniers Oct 29 '09 at 01:31
1
There are a number of ways to do this. e.g. You could use psexec to run a script on each target machine. As for the script, here's a few you could start with.

John Gardeniers
- 27,458
- 12
- 55
- 109
1
My answer on this question has a script that will do what you want. It parses all the groups / users on the list of computers fed to it and has some rudimentary capabilties to ignore users / groups you're not interested in.

Evan Anderson
- 141,881
- 20
- 196
- 331
-
all the examples i found on the net all used VBScript. its interesting that it seems to be the "choice" language for this kind of stuff. – djangofan Oct 29 '09 at 20:53
-
I use VBScript or JScript because they're more expressive than batch scripting and they're available "out of the box" on modern Windows installs (whereas PowerShell still isn't)... – Evan Anderson Oct 30 '09 at 01:49
-
-
I daresay that Windows 7 doesn't qualify as "most modern Windows installs" on October 30, 2009. I work with a lot more Windows Server 2003, Windows XP, and Windows Vista than I do Windows Server 2008 R2 and Windows 7. – Evan Anderson Nov 02 '09 at 17:13