Apr 23, 2020 15:24
$ou = "test.local/ou1"
$groups = get-distributiongroup -ResultSize Unlimited -OrganizationalUnit $ou
foreach ($group in $groups){
$member = get-distributiongroupmember $group
Add-ADPermission $group.Id -ExtendedRights Send-As -user $member.alias
}
#distributiongroups,
#exchange