Using EMS to enumerate the e-mail addresses of Distribution Group members

The magic mojo for listing the SMTP addresses of all members of a Distribution Group is as follows:

Get-DistributionGroupMember “My Distribution Group Name” | ForEach {$_.PrimarySMTPAddress.ToSTring()}

Invocation of the ToString() method is necessary since the PrimarySMTPAddress property contains objects with separate properties for the address length, the portion of the address before the @, the domain, and a Boolean specifying whether or not the address is valid.

Leave a Reply