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

Extracting email addresses from a dynamic distribution group

I need to extract the email addresses for the results of a dynamic distribution group which is filtered.  I've played around with get-dynamicdistributiongroup and get-recipient, but to no avail. This is on Microsoft Exchange 2007, service pack 2.
1 Solution
try this

$MarketingDepartment = Get-DynamicDistributionGroup -Identity "Marketing Department"
Get-Recipient -RecipientPreviewFilter $MarketingDepartment.RecipientFilter | FT  Name,PrimarySmtpAddress
wlcsd-networkmanagerAuthor Commented:
Thank you so much, Akhater!  You wouldn't believe how difficult is was to find this solution on the web.
I'm trying to follow the info from above and getting an error when try to run again Exchange Command Shell
The dynamic Distribution list I want is call GSLLVField

$GSLLVField = Get-DynamicDistributionGroup -Identity "GSLLVField"
Get-Recipient -RecipientPreviewFilter $GSLLVField.RecipientFilter | FT  Name,PrimarySmtpAddress

It will display all of the email address for the entire company.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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