Solved

Exchange 2007: Export a list of all distribution lists and their members

Posted on 2012-03-19
3
522 Views
Last Modified: 2012-03-20
I would like to export a list of all distribution lists and their members using powershell. What would be the method for doing so?
0
Comment
Question by:vitalsign0
3 Comments
 
LVL 4

Expert Comment

by:ITF1
ID: 37740026
Hi,
please use:
Get-DistributionGroup | Get-DistributionGroupMember | Export-CSV C:\Members.csv
This gives you all information into a .csv.

Regards

ITF1 | Anthony
0
 
LVL 18

Accepted Solution

by:
suriyaehnop earned 400 total points
ID: 37740916
Hi,

This one I recently created.

$Groups = Get-DistributionGroup -ResultSize Unlimited


$Result = Foreach ($Group in $Groups){

$DL=Get-DistributionGroup -Identity $Group.alias
$DL | FT Displayname,PrimarySMTPAddress


Get-DistributionGroupMember -Identity $DL | where {($_.RecipientType -eq 'UserMailbox') `
-or ($_.RecipientType -eq 'MailUniversalDistributionGroup') -or ($_.RecipientType -eq 'MailContact')} | FT displayname,primarysmtpaddress

} 

$Result | Out-File C:\Users\DLResult3.csv

Open in new window


Thie output will be CSV in following format:

Distribution
Displayname   PrimarySMTPAddress
All_Users          all_users@contoso.com

Displayname   PrimarySMTPAddress
Member01      .....
.............
0
 
LVL 1

Author Closing Comment

by:vitalsign0
ID: 37744546
This worked. Thank you.
0

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a Contact 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 Recipients >> Contact ta…
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…

747 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

18 Experts available now in Live!

Get 1:1 Help Now