Exchange 2010 Add Mailbox Folder Permissions including Subfolders
I was asked by a user today for access to a specific folder in an old user’s mailbox within Outlook. There were no free computers and so the easy way out of setting up Outlook with the mailbox was not an option. I fired up Google and found this handy script for use in the Exchange Console:
ForEach($folder in (Get-MailboxFolderStatistics AliasofSharer| Where { $_.FolderPath.ToLower().StartsWith(“/Invoices“) -eq $True } ) )
{
$foldername = “AliasofSharer:” + $folder.FolderPath.Replace(“/”,”\”);
Add-MailboxFolderPermission $foldername -User AliasofRequestor-AccessRights PublishingEditor
}
- Change the name of the folder to be shared to where Invoices is here: ‘FolderPath.ToLower().StartsWith(“/Invoices“)’
- Change ‘AliasofSharer’ to the alias of the user who will be sharing the folder
- AliasofRequestor is who will be given access to said folder
- In the above example I’ve used PublishingEditor but this can be changed as required.