Granting an administrator full access permissions to all mailboxes whose associated user accounts are stored in a specific OU

Get-Mailbox | Where { $_.OrganizationalUnit -eq “yourdomain.com/OU/SubOU” } | Add-MailboxPermission -User ITADMIN -AccessRights Full access -Inheritance Type all

This script will locate all users with mailboxes located in the OU you specify in the “yourdomain.com/OU/SubOU” section. It will then grant the user you specify in the -User ITADMIN section full access to all mailboxes whose associated user accounts are stored in the specified OU

Leave a Reply

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