All DGs and associated DG members.
Sharing
the script to retrieve a list of all DGs and associated DG members.
- $Groups=Get-DistributionGroup
- $Groups| foreach{
- $GroupName=$_.Name
- $Report+=Get-distributionGroupMember -identity $_.identity| select @{Name='Distribution Group'; Expression={[String]::join(";", $GroupName)}}, Name, Emailadress, PrimarySmtpAddress}
- $Report| export-csv "m:\DG.csv" –notype
Comments
Post a Comment