Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-12-10
3
Medium Priority
?
200 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
[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
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Colin McDonald earned 2000 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

610 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