Exchange Get All Members From Distributie Group

Het script:

GetAllMembersFromDistributionGroup.sp1
foreach($group in Get-DistributionGroup)
{
write-output "GroupName:$group "
Get-DistributionGroup $group | ft alias,primarysmtpaddress
Write-output "GroupsMembers:"
Get-DistributionGroupMember $group | ft alias,primarysmtpaddress
write-output ‘ ‘
}
Sla het op in de Exchange Scripts map.

Uitvoeren:

GetAllMembersFromDistributionGroup.sp1 > c:\GetAllMembersFromDistributionGroup.txt

Doe je voordeel er mee.

Leave a Reply

Translate »