Export members of a dynamic distribution list to a text file

I would like to use the Exchange Management Console to export all members of a dynamic distribution list in our Exchange environment to a text file. I would like this file to simply include the recipient name and recipient type. Any help would be greatly appreciated, thanks!
robbie_woodleyAsked:
Who is Participating?
 
Chris DentConnect With a Mentor PowerShell DeveloperCommented:

Nice and easy :)

In the Exchange Management Shell...

Get-DistributionGroupMember "TheGroup" | Select-Object Name, RecipientType | Export-Csv "somefile.csv"

HTH

Chris
0
 
robbie_woodleyAuthor Commented:
Does this work for a Dynamic Distribution Group? I'm getting an error message that states that my DDG, AllFacStaff, can not be found on our domain controller. It is definitely there...but when I do a "Get-DistributionGroup" cmd it only pulls up static distribution groups, not dynamic. Thanks for your help!
0
 
robbie_woodleyAuthor Commented:
Ha...thanks for the help but there is a "Preview" button in the EMC under the filter tab that allows you to view all members!
0
 
skbarnardCommented:
What happens when you try to export to the desktop and you get "access denied"?
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.

All Courses

From novice to tech pro — start learning today.