Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
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 1:49
    
Actually, Powershell is included in Windows 7 out of the box. –  AndyM Nov 2 '09 at 16:33
    
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 2 '09 at 17:13
add comment

You should use a powershell script. They have pre-made scripts on some sites.

http://psobject.codeplex.com/

http://myitforum.com/cs2/blogs/yli628/

share|improve this answer
    
You could use PowerShell but it's hardly a requirement. –  John Gardeniers Oct 29 '09 at 1:31
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.