If you have a public folder that you want to apply permissions in Office 365, you might have noticed that the web console can be slow if you have a long list of folders and sometimes the web console will time out and result in inconsistent permissions applied to sub folders.

A much better method is to apply permissions to it using the Exchange Management Shell, its pretty easy and works with 365 and hosted Exchange.  The command is:

Add-PublicFolderClientPermission –Identity “FolderName” –user UserName –AccessRights AccessType

For instance, to add the user plegorreta to the folder Pablo PublicFolder with the Publishing Editor permission, the command would be the following:

Add-PublicFolderClientPermission –Identity “\Pablo PublicFolder” –User plegorreta –AccessRights PublishingEditor

If we want to apply permissions to subfolders as well, in this case Pablo PublicFolder, and all of its subfolders, we can use the Recurse function with the Add-PublicFolderClientPermission command.

Get-PublicFolder –Identity “FolderName” –Recurse | Add-PublicFolderClientPermission –User UserName –AccessRights AccessType

For our example user and folder, this would look like:

Get-PublicFolder –Identity “\Pablo PublicFolder” –Recurse | Add-PublicFolderClientPermission –User plegorreta –AccessRights PublishingEditor

Notice that we don’t need to specify the Identity in the Add-PublicFolderClientPermission command because we used the pipe command to filter the PoSH command. You can also use this method to remove access rights.

For additional informaiton on the Add-PublicFolderClientPermissions command see this Microsoft Technet Article.