Link to home
Start Free TrialLog in
Avatar of AutomatedIT
AutomatedIT

asked on

Store Distribution Group Members in Variable for use in Send-MailMessage

Trying to use Powershell to get the members of a Distribution Group into a variable that can be used in an email.  The Get-DistributionGroupMember returns the list that I want to see but I cannot figure out how to get it into a variable that can be used in the body of an email by the Send-MailMessage command.

How can I get the data stored and retrievable?  All I really need is the list of the names of the members, I do not need the recipient type.

Thank you,
Jay
ASKER CERTIFIED SOLUTION
Avatar of Michael B. Smith
Michael B. Smith
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial