Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export Emailaddresses (ProxyAddressString comma separated) with Powershell

Posted on 2014-12-17
2
Medium Priority
?
697 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
In this video we show how to create an email address policy 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…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

876 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