Solved

Export Names and Addresses from Distribution Group in Exchange 2007

Posted on 2013-01-22
1
551 Views
Last Modified: 2013-01-22
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
Comment
Question by:baleman2
1 Comment
 
LVL 10

Accepted Solution

by:
ddiazp earned 500 total points
ID: 38808372
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Utilizing an array to gracefully append to a list of EmailAddresses
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a User Mailbox 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 >> Mailb…
In this video we show how to create a Shared Mailbox 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 >> Sha…

828 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