Change Default calendar rights for Exchange mailboxes

Hi everyone,

Today I am writing this blog, I know that a few one exist on the internet but what I miss there is the ability to also check the mailbox language.
This morning I encountered the same issue again, when applying the default rights I saw that sometimes there is a calendar and in other cases there is the agenda (dutch).

The following script will workaround this naming convention with a pre check on the first Calendar folder that is created in the mailbox.
The code will change all calendars when the default accessrights are not set to Reviewer. It will change the rights to reviewer.

Powershell code:

$mbx = get-mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox

foreach ($mailbox in $mbx) {
$calendar =Get-MailboxFolderStatistics $mailbox.alias -FolderScope Calendar| select -first 1 name
$folder = $calendar.Name
$calendarID = (‘{0}:\{1}’ -f $mailbox.alias,$folder)
$Current = Get-MailboxFolderPermission -Identity $CalendarID -User Default

if ($current.AccessRights -ne “Reviewer”) {
Set-MailboxFolderPermission -Identity $CalendarID -User Default -AccessRights Reviewer

Free subscription

You may also like...

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *