Public Folder Migration to Exchange Online (500k Folders) Part 11 — Post-Migration Issues (Add/Remove Permissions)

James Baker
Jun 29, 2018 · 3 min read

I thought I’d post this to help those who are struggling with Microsoft throttling and endless re-authentication prompts when trying to add/remove Public Folder permissions after you’ve migrated to Exchange Online Public Folders.

I’ve raised this with Microsoft, and while they have reduced their throttling limits for us, trying to assign permissions to vast number of folders always fails. Now… while Microsoft do provide a new script designed for Exchange 2013 and Exchange Online, found here, we certainly found we still got timeout issues and (in our case hierarchy issues where Mailbox1 kept going offline).

This is just one of the issues we were getting when trying to add a large number of permissions. This is all down to throttling, simply leave it and it’ll come back.

An example of throttling when trying to Add/Remove Public Folder permissions
An example of throttling when trying to Add/Remove Public Folder permissions

Now, getting the above error when you run the script is never going to go down well. Basically it’s broken and you have to start again, this is extremely frustrating…

So, I wrote the below script. It’s partly taken from Microsoft’s own, however I’ve amended it so it checks the PowerShell session to see if it becomes broken if it does it’ll drop and reconnect it.

It also checks against the known errors that I’ve come across. If detected, it’ll pause the script for a set time before dropping and reconnect to ExO.

From having regular timeouts or issues, I’ve now been able to run this script for days (until my machine runs out of memory).

An example of the script above…


365 UC

Stories from the world of UC by a bunch of UC…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store