Powershell – Show all users in DistributionGroup

$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

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *