$File = “C:\ita\groupslog.txt”
$Mailboxes = Get-DistributionGroup | select name , alias ,displayname,EmailAddresses
$Mailboxes | ForEach {
echo “”
echo “”
echo $_.name
Get-DistributionGroupMember -id $_.alias
} | out-File $File
$File = “C:\ita\groupslog.txt”
$Mailboxes = Get-DistributionGroup | select name , alias ,displayname,EmailAddresses
$Mailboxes | ForEach {
echo “”
echo “”
echo $_.name
Get-DistributionGroupMember -id $_.alias
} | out-File $File