Thursday , December 12 2024
Home - Development - Exchange 2010 Add Mailbox folder permissions including subfolders

Exchange 2010 Add Mailbox folder permissions including subfolders

I’m always asked how to add a user to have Mailbox folder permissions for a folder and sub-folder in another users mailbox.  Exchange 2010 (SP1 for Set)  includes to new commands ‘Add-MailboxFolderPermission’ and ‘Set-MailboxFolderPermission’.

Save the following in a new .ps1 file and run with Exchange management rights making changes to the script as required.

ForEach($folder in (Get-MailboxFolderStatistics MailAliasofSharer| Where { $_.FolderPath.ToLower().StartsWith(“/cabinet“) -eq $True } ) )
{
$foldername = “MailAliasofSharer:” + $folder.FolderPath.Replace(“/”,”\”);
Add-MailboxFolderPermission $foldername -User MailAliasofRequestor-AccessRights PublishingEditor
}

Notes:

  1. Change ‘MailAliasofSharer’ to be the user who wants to share their folders
  2. MailAliasofRequestor being given the new rights.
  3. In the above example I’ve used PublishingEditor but this can be changed as required.
  4. Change ‘cabinet’ to be the starting folder name in ‘FolderPath.ToLower().StartsWith(“/cabinet“)’

Check Also

The pain of TLS 1.2 with PowerShell module for Azure Active Directory (MSOnline)

Building labs in a hurry sometimes can bite you with recent changes in Office 365 …

5 comments

  1. kids cabin beds

    Very great post. I simply stumbled upon your weblog and wanted to mention that I’ve really enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I hope you write once more very soon!

  2. This is awesome!

  3. Awesome. wish there was more of this on the NET. Please consider writing more of these. Very helpful.

    ACE

  4. this is superb!!!!

  5. works on exchange online as well!!!

Leave a Reply

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