Solved

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

Posted on 2014-03-03
3
5,393 Views
Last Modified: 2014-03-05
I am trying to export the member and groups of my Distribution List to a CVS format,  How do I do it?
0
Comment
Question by:c7oi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
ID: 39902142
You can use powershell, lots of examples in the script center

http://gallery.technet.microsoft.com/scriptcenter/Export-all-Excange-ede89a90

If you like a GUI adinfo is a great free tool http://www.cjwdev.co.uk/Software/ADReportingTool/Info.html

Thanks

Mike
0
 
LVL 8

Expert Comment

by:5teveo
ID: 39902216
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...
'=========================================================================================
'
'district.k12.fl.us/STUDENT/SCHOOLS/SPECIAL/BAC-9001/*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 & "@mail.district.k12.fl.us" & chr(09) & objMember.ADsPath
    objFile_ADBackup2.WriteLine objMember.sAMAccountName & "@mail.district.k12.fl.us"
Next

objFile_ADBackup.Close
0
 
LVL 4

Expert Comment

by:michaelalphi
ID: 39902414
Hi C7oi,
You can try this free tool (http://www.lepide.com/active-directory-query.html) to export the member and groups of your distribution list in CSV format.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In-place Upgrading Dirsync to Azure AD Connect
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question