Exchange Public Folder – Subsequent Right Management (recursive)

Often you have to add rights for a new user long after the creation of a public folder. If there’s much Data in this folder and it’s subfolders, the usual method by using the Exchange Control Panel will often result in OutOfMemory-Exceptions. To prevent this behaviour, we could use the Exchange Scripts, which were placed on your server during the installation:

  1. At first we need a new Instance of the Exchange Management Shell (EMS) or a PowerShell Console with loaded Exchange Snapins (can be done by using the command “Add-PSSnapin Microsoft.Exchange.Management.Powershell.Snapin”).This needs to be done as the provided Scripts from Microsoft won’t import those Commands again.
  2. In the Shell we will now change our Working-Directory to the Path, were the Scripts are stored. This can be done by the following command:
    cd “C:\Program Files\Microsoft\Exchange Server\V15\Scripts”
    You may replace the Folder “V15” with the Versionnumber of your Exchange-Server.
  3. Now we will execute the following command:
    .\AddUsersToPFRecursive.ps1 -TopPublicFolder “\[folder-path]” -User “[UPN of the User]” -Permission “[Permission-Set]”
    Bsp.: .\AddUsersToPFRecursive.ps1 -TopPublicFolder “\technet” -User “randomguy@c4y.biz” -Permission “Owner”
  4. After a short delay the console will show you every folder as an output-line to confirm the modification of rights.

That’s it!

Leave a Reply

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