How to extract users and group from a Active Directory Distribution List to a CSV format?

c7oi used Ask the Experts™
I am trying to export the member and groups of my Distribution List to a CVS format,  How do I do it?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2013
You can use powershell, lots of examples in the script center

If you like a GUI adinfo is a great free tool


Top Expert 2012

This is a scripts that builds a date based name.

Dim tsDate
Dim tsTime

tsDate = Year(Now) & "-" & Month(Now) & "-" & Day(Now) & Hour(Now) & "-" & Minute(Now) & "-" & Second(Now)

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile_ADBackup  = objFSO.CreateTextFile("S4-Users-" & tsDate & "AllData.txt", 2)
Set objFile_ADBackup2 = objFSO.CreateTextFile("S4-Users-" & tsDate & "EmailOnly.txt", 2)
Set objShell = WScript.CreateObject("WScript.Shell")

'Backup S4_Users Group before refreshing...
'*Security Groups/S4_Users
Set objGroup = GetObject("LDAP://cn=S4_Users,ou=*Security Groups,ou=BAC-9001,ou=SPECIAL,ou=SCHOOLS,ou=STUDENT,dc=district,dc=k12,dc=fl,dc=us")
For Each objMember in objGroup.Members
    objFile_ADBackup.WriteLine objMember.sAMAccountName & "" & chr(09) & objMember.ADsPath
    objFile_ADBackup2.WriteLine objMember.sAMAccountName & ""

Hi C7oi,
You can try this free tool ( to export the member and groups of your distribution list in CSV format.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial