Solved

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

Posted on 2014-03-03
3
5,207 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article runs through the process of deploying a single EXE application selectively to a group of user.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

777 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