Distribution Groups - export lists and members
I need a small piece of information from you. I’m running 38 AD servers and 22 Exchange servers around 20 states. Now as it is spread all over, I wanted to know if there is any way I can export he distribution groups and the members to an organized csv or some other format? If yes, please post the procedure.
Thank you.
Re: Distribution Groups - export lists and members
I have enever used but as per my research there is a command line utility named “AdFind” can help you with the same. You can get the same from here
The filter for distribution groups would be (watch line wrapping, this is one line):
(&(objectCategory=group)(!groupType:1.2.840.113556.1.4.803:=2147483648))
Apart from this you can also retrieve the the member multi-valued attribute, which would be a collection of the Distinguished Names of all direct members (ignoring group nesting).
RE: Distribution Groups - export lists and members
Hey guys, i use a vb script like that:
On Error Resume Next
Set objGroup = GetObject _
("LDAP://cn=GroupName,ou=someou,dc=fabrikam,dc=com")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next
save it with a name like test.vbs and run from a command prompt
cscript.exe test.vbs >out.txt
Hope it helps.