Last post Sep 17, 2009 08:37 AM by ryan.gomez
Sep 17, 2009 08:37 AM|ryan.gomez|LINK
How do I go about getting the memberships of all distribution lists and NT groups in Active Directory in C# (VB works too)? It's rather straightforward to get ALL AD groups but I'm not sure how to go about extracting all AD groups and their respective memberships
at the same time.
I can do this with ldapsearch as shown below but not sure how to display a group's name and its members in C#. Any help would be very welcome. Thanks.
ldapsearch -h portaldb7.ad.ic.ac.uk -p 389 -b "cn=groups,dc =ad,dc =ic,dc=ac,dc =uk" objectclass=groupOfUniqueNames uniquemember