Solved

Export Emailaddresses (ProxyAddressString comma separated) with Powershell

Posted on 2014-12-17
2
488 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
Comment Utility
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
Comment Utility
Thank you, very much.
0

Featured Post

Want to promote your upcoming event?

Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

771 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

11 Experts available now in Live!

Get 1:1 Help Now