Solved

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

Posted on 2014-12-10
3
192 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 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

707 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