How to scan Domian machines for missing ad groups within local admin group.

Hi,
I am looking for a way to scan machines on my network for missing Domain group in the local administrators group. I understand that can be corrected via group policy which will enforce to all machines added to domain. However, currently I just need an audit tool or script that will tell me which machines are missing that ad group. Thanks in advance.
Claudia CarlottiIT DirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PberSolutions ArchitectCommented:
There is no default tool to do it.  
Here's is a powershell script that will do it based on a input file
http://www.powershellneedfulthings.com/?p=7
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dlb6597Commented:
just create (or edit) a group policy object that applies to the desired computers OU...under Computer Config, Windows Settings, Security Settings you will see Restricted Groups. Here you can define the membership of the local administrator group...this will not only add the missing members, but remove any incorrect members...
0
NVITEnd-user supportCommented:
If you're ok with psexec...

Run psexec against entire domain:
psexec \\* -s net localgroup administrators | find /i "domain">results.txt

If you want to run psexec against select stations...
- Open a CMD window
Make a file of station names:
net view >stns1.txt
for /f "tokens=1-2 delims=\ " %a in (stns1.txt) do echo %a>stns.txt

Open in new window

- If needed, manually remove any stations from the list.

Run psexec against stations:
for /f %a in (stns.txt) do (
   echo %a>>results.txt
   psexec \\%a -s net localgroup administrators | find /i "\domain">>results.txt
)

Open in new window

0
Claudia CarlottiIT DirectorAuthor Commented:
thanks all
0
NVITEnd-user supportCommented:
Thanks for the update, Vachik. Glad to help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.