• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • Last Modified:

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
0
baleman2
Asked:
baleman2
1 Solution
 
ddiazpCommented:
I assume highlighting the results, and copy/paste into Excel is not an option? (list too large?)

What about this?

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

Then you can either copy/paste special on excel, or open it on excel
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now