Solved

Exchange 2010 SP3 | Powershell - Export all DLs to CSV and Import Commands

Posted on 2014-12-10
3
188 Views
Last Modified: 2014-12-12
I know the command to export a specified DL to csv but is there a command to export all DLs to CSV?
0
Comment
Question by:MacGyver80
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Colin McDonald earned 500 total points
ID: 40492095
I use the following powershell script to export distribution lists and its members to a CSV file

$dist = ForEach ($group in (Get-DistributionGroup -Filter {name -like "*"}))
   {  Get-DistributionGroupMember $group | Select @{Label="Group";Expression={$Group.Name}},@{Label="User";Expression={$_.Name}},SamAccountName
   }
$dist | Sort Group,User | Export-CSV c:\scripts\file.csv -NoTypeInformation


Hope that helps

Not used this one before but it looks pretty useful

https://gallery.technet.microsoft.com/Export-all-distribution-707c27eb#content
0
 
LVL 5

Author Closing Comment

by:MacGyver80
ID: 40493833
Exactly what I needed.  Worked flawlessly.

Thank you
0
 
LVL 1

Expert Comment

by:Colin McDonald
ID: 40495675
No probs,  used it a few times now...  Happy to help
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In-place Upgrading Dirsync to Azure AD Connect
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data‚Ķ
This video discusses moving either the default database or any database to a new volume.

821 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