Solved

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

Posted on 2014-03-03
3
4,982 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
3 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
how to add IIS SMTP to handle application/Scanner relays into office 365.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now