Exchange 2010 Calendar Permissions from the Powershell

With Exchange 2010 came the ability to manage permissions on folders through the powershell, one of the most common tasks with this is managing calendar permissions. Here are a set of simple commands to aid managing them.

To get the permissions of a mailbox:

Get-MailboxPermission -identity "Dan Woodhouse"
To get the permissions of a subfolder in a mailbox:
Get-MailboxFolderPermission -identity "Dan Woodhouse:\Calendar"
To change permissions on a subfolder in a mailbox:
Add-MailboxFolderPermission -identity "Dan Woodhouse:\Calendar" -user "The Boss" -AccessRights Reviewer
To remove permissions on a subfolder in a mailbox:
Remove-MailboxFolderPermission -identity "Dan Woodhouse:\Calendar" -user "The Boss"
If we wanted to add permissions to every mailbox that matches a certain criteria we can use filters, in the example below we will grant The Boss Author permissions to every mailbox for users whos name starts with Dan and are based in the Birmingham office:
Get-mailbox -Filter {(Name -like 'Dan*' -and Office -eq 'Birmingham')} | ForEach-Object {Add-MailboxFolderPermission $_":\Calendar" -User "The Boss" -AccessRights Author}
To remove these permissions we could use:
Get-mailbox -Filter {(Name -like 'Dan*' -and Office -eq 'Birmingham')} | ForEach-Object {Remove-MailboxFolderPermission $_":\Calendar" -User "The Boss"}
Make a Free Website with Yola.