Link to home
Start Free TrialLog in
Avatar of rookie_b
rookie_bFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Get a list of AD groups and their members

I have a list of AD groups and would like to export them into a report, which includes both the group name and the members. Exporting directly to csv only gives me the members, so I was wondering if there was a way to get the group name as well. Is there an approach I could apply to other commands in general? How do I  include the object against which the command was run alongside the command output itself?

Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skullnobrains
skullnobrains

you can use an ldap browser and issue a regular ldap command. that will allow to query any attribute.
Avatar of rookie_b

ASKER

Thank you Sam!

In my case  I actually prefer your suggestion in the post you referenced. All I had to change is the way how "$ADgroups" was defined and later referenced, so I can use a list of groups, rather than all security groups.

Thank you skullnobrains!

This is something I will definitely explore in the future.


Cheers!