Solved

Export Emailaddresses (ProxyAddressString comma separated) with Powershell

Posted on 2014-12-17
2
515 Views
Last Modified: 2014-12-17
Hi Experts,

I hope someone can help me.

I try to export Exchange Distribution Lists with the following Powershell command:
Get-DistributionGroup |select Name, DisplayName, Alias, PrimarySmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses | ForEach-Object {$_.ProxyAddressString}}} |Export-Csv -path "C:\Temp\dl.csv"

Open in new window


As result I get an colloumn EmailAddresses with Values like this:
smtp:GEOAll@domain.com SMTP:GEOAll@domain.com

But I need to get it comma separated like this:
smtp:GEOAll@domain.com, SMTP:GEOAll@domain.com

Do you know how?

It's Exchange 2010 SP3 on Windows Server 2008 R2

Thanks
Daniel
0
Comment
Question by:Honaco
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40504462
Try..
Get-DistributionGroup |select Name, DisplayName, Alias, PrimarySmtpAddress, @{Name="EmailAddresses";Expression={($_.EmailAddresses | ForEach-Object {$_.ProxyAddressString}) -join ","}} |Export-Csv -path "C:\Temp\dl.csv"

Open in new window

0
 

Author Closing Comment

by:Honaco
ID: 40504523
Thank you, very much.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
This video discusses moving either the default database or any database to a new volume.
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…

810 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