Inbox Subfolder Access Via Powershell (Exchange 2010)

In this example we will give USER2 access to USER1’s inbox and all subfolders.

First off I did the following command which gave USER2 inbox access to USER1’s mailbox (note this only gave inbox access it did not give access to subfolders under inbox)

 Add-MailboxFolderPermission -Identity USER1:Inbox -User USER2 -AccessRights ReadItems

 So then I needed to give access to the subfolders, so we use the following command.

ForEach($f in (Get-MailboxFolderStatistics USER1 | Where { $_.FolderPath.Contains(“/Inbox”) -eq $True } ) ) {$fname = “USER1:” + $f.FolderPath.Replace(“/”,””);Add-MailboxFolderPermission $fname -User USER2 -AccessRights Editor}

One thing to note with this command if the user has a slash ( / ) in the folder name it will fail on that folder.

Duncan

5 thoughts on “Inbox Subfolder Access Via Powershell (Exchange 2010)

  1. Solved a problem I've had with failed folder permssion inheritance which has had me stuck for a month!
    Gets around the fact the 'get-mailboxfolder' only works on the mailbox of the logged-in user, which is pretty useless, really.
    Thanks a million!

  2. Exceedingly useful.
    Makes up for the fact that 'get-mailboxfolder' only works on the mailbox of the logged-in User – which is pretty useless, really.
    Fixed a problem of failed folder permission inheritance I've been struggling with for nearly a month!
    Many thanks.

Leave a Reply