Solved

Export Emailaddresses (ProxyAddressString comma separated) with Powershell

Posted on 2014-12-17
2
529 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
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…
This video discusses moving either the default database or any database to a new volume.

820 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