Link to home
Start Free TrialLog in
Avatar of baleman2
baleman2

asked on

Export Names and Addresses from Distribution Group in Exchange 2007

I need a list of a Distribution Group's members.  The list needs to be comprised of "Name" and "Email Address" and in a format that allows it to be opened in an Excel spreadsheet.

The following command (from Powershell) displays the data that I need:

Get-DistributionGroupMember -Identity "EnterDLNameHere" | Get-Mailbox | ft DisplayName,PrimarySMTPAddress

The output from the command looks like this in the PowerShell window:
 
Display Name                                       Primary Address
----------------------------------------------------------------------------------------------------------------
Jack Smith                                             jsmith@whatever.com
Jand Doe                                               jdoe@whatever.com

The following command exports it to a file named "data.csv":

Get-DistributionGroupMember -Identity "EnterDLNameHere" | Get-Mailbox | ft DisplayName,PrimarySMTPAddress | Export-CSV c:\data.csv

However, when I open the file in an Excel spreadsheet, I get line items of information enclosed in brackets.

I've attached a screenshot.

Is this a syntax error or what?
LL-list.csv
ASKER CERTIFIED SOLUTION
Avatar of ddiazp
ddiazp
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial