Bulk permissons resource calendar

This is useful when you have a user who has access rights to a lot of resource mailbox calendars or if you want to modify the rights of the  calendar’s Default user.

First we need to grab the resource mailboxes only. When you  have kept the default mailbox size than your ProhibitSendQuota should be 490 MB.  We can grab Room and Equipment mailboxes in once when we filter for the ProhibitSendQuota :

Get-Mailbox -OrganizationalUnit “TenantName” -ResultSize unlimited | where {$_.ProhibitSendQuota -eq “490 MB”}

Make sure that you see only resource mailboxes and the output contains all resources you expect.
If you are pleased with the result in the output run the following from the ISE or Powershell :

$allresbox = Get-Mailbox -OrganizationalUnit “TenantName” -ResultSize unlimited | where {$_.ProhibitSendQuota -eq “490 MB”}
foreach ($Mailbox in $allresbox)
{Set-MailboxFolderPermission -Identity ($Mailbox.alias+’:\Calendar’) -User Default -AccessRights AvailabilityOnly }

We just have granted AvailabilityOnly rights to the Default user. ( showing free / busy information )

The second Method to grab the resource mailboxes would be to filter for the RecipientTypeDetails parameter. Please keep in mind that the value of this parameter can be different since a resource mailbox can be a RoomMailbox or an EquipmentMailbox. The filter must be set accordingly, I recommend to run it on both types :

Get-mailbox -OrganizationalUnit “TenantName” -ResultSize unlimited | where {$_.RecipientTypeDetails -eq “RoomMailbox”}

Get-mailbox -OrganizationalUnit “TenantName” -ResultSize unlimited | where {$_.RecipientTypeDetails -eq “EquipmentMailbox”}

Same again , when the output looks like expected, replace the red part ( one after the other ) with the red part in the script.

To use this on user mailboxes verify the output of the following command and replace the command below with the red part in the script above:

Get-mailbox -OrganizationalUnit “TenantName” -ResultSize unlimited

For OnPremise and Exchange 2010 syntax please refer to MutliTenant VS. OnPremise in the top navigation bar.


Leave a Reply

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