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

how to export members of a distribution list in exchange 2007 exporting firstname and lastname

how do i export members of a distribution list in exchange 2007 exporting the users firstname and lastname?
The command below exports the list, but it only gives me the users alias.  Is there a way to export first and last name?

Get-DistributionGroupMember -identity "testdl" | Export-Csv -not C:\MyFile.Csv
0
syoungblood
Asked:
syoungblood
  • 2
1 Solution
 
montezzCommented:
This gives first and last and a lot more; should be easy to clean the excessive info out.
Get-DistributionGroupMember "testdl" | fl > C:\MyFile.Csv
0
 
syoungbloodAuthor Commented:
Yes, i found this command first.  This is the command w/o the -not switch.  I just thought i could get first and last name w/o all the other junk.  Thanks.
0
 
syoungbloodAuthor Commented:
I was able to get it to import correctly to delete the columns i don't need.  Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

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

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