Quantcast
Channel: PowerShell – The AEMS Flogger
Viewing all articles
Browse latest Browse all 12

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 12

Trending Articles