Cleaning up Mailbox Folder Permissions

I guess many of you who are reading my blog are also working in the Messaging and/or Cloud area. That means that you also perform Exchange migrations or you are planning them. Earlier this week I was running a clean up after an Exchange migration and I have noticed many Mailboxes with “AvailableOnly” or “none” Calendar Permissions.

This happened already few times in the last couple of months with some few Mailbox calendar permissions.

 

So how to fix that in an easy way?

Of course I want to use PowerShell to fix that small issue. However, I also had to think about the region I am coming from. Here in Switzerland we have four spoken languages (German, Italian, French and Romanic) and also English. The Company area I had the migration is located in German speaking part. That means that the language settings for Outlook are in English or in German.

Why this is important to know? Well, for English profiles we can use the PowerShell parameter :\Calendar, but by German profiles we talk about :\Kalender. I we don’t think about this point, our PowerShell script will fail.

 

Let us have a look on the script. I will present you the script below with explanations commented in it:

After running the script, we have identified all mailboxes which had the access right “AvailableOnly” or “none” (except the discovery mailbox). Then we have removed all users who had the permissions we have filtered.

Alternative we can use this script of course with other permission parameters.

 

As I have written earlier in this article, I am living and working in a country with multiple languages. If you want to modify the language settings for your region, also feel free.

However, there is also another option you can modify the script by using the following code:

 

 

With this you don’t have to think about the language settings anymore.

 

 

 

Leave a Reply

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