tags:

views:

223

answers:

1

I have been trying get get a script that will get the membership from the local computer's Administrators group by using an OU full of computers. I can return the Administrators group membership from my local computer and a list of computers from an OU, can't quite figure out how to do both with resorting to AD Users & Computers and going from computer to compute. Any thoughts.

A: 

Since the Administrators group is stored on each local machine's SAM database, you'll need to access each computer from your OU list and ask it to enumerate the members of it's Administrators group. This is possible to do remotely.

NetGroupGetUsers can list the users in a group for a specified server, so if you call that for the "Administrators" group on each server in your list, you'll have the memberships on each system.

Chris Smith