This script is for cloning a Role Assignment Policy in Exchange.
For example, if you want to allow certain users to add/remove members to the distribution groups they own, you need to enable the "MyDistributionGroups" option in the role assignment policy that is assigned to the user mailboxes, but you probably don't want to alter the default one.
This case it's simple to clone the default policy, make changes to that cloned version and assign it to only those mailboxes that needs it.
SCRIPT
$sourcePolicy = "Default Role Assignment Policy" $newPolicy = "New Cloned Policy" # Clone the policy $rolesToCopyOver = (Get-RoleAssignmentPolicy $sourcePolicy).AssignedRoles.Name New-RoleAssignmentPolicy -Name $newPolicy -Roles $rolesToCopyOver
Now you can edit the new policy and assign it as needed with the Set-Mailbox -RoleAssignmentPolicy cmdlet.
Enjoy 🙂
Comments