?
Solved

Export Names and Addresses from Distribution Group in Exchange 2007

Posted on 2013-01-22
1
Medium Priority
?
555 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
ddiazp earned 2000 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
To show how to generate a certificate request 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 Servers >> Certificates…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

777 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