Set Default Mailbox Calendar Permission


This script will set default Mailbox Calendar Permission.


This script is to help Exchange Admins to set default Mailbox Calendar Permission via PowerShell.


This script contains one advanced function Set-OSCDefaultMailboxCalendarPermission, you can use this script in the following ways:

Step1: Run the script in the Exchange Management Shell, type the one command: Import-Module <Script Path> at the prompt.
For example, type Import-Module C:\Script\SetDefaultMailboxCalendarPermission.psm1
Here are some code snippets for your references.

Foreach($name in $names){
    Set-MailboxFolderPermission "$($_):\Calendar" -User Default -AccessRights $Permission -ErrorAction SilentlyContinue
    #Check error
    $Checkpermission = (Get-MailboxFolderPermission "$($_):\Calendar").AccessRights
    if($Permission -ne $Checkpermission){
        Write-Error "The value $Permission is incorrect, please check again."


Example 1: Set default calendar permission for all mailboxes to "LimitedDetails" in Exchange environment except Mailbox "Test1".
Command: Set-OSCDefaultMailboxCalendarPermission -Exception "Test1" -Permission "LimitedDetails"

Example 2: Set default calendar permission for Mailboxes "Test1","Test2" to "LimitedDetails".
Command: Set-OSCDefaultMailboxCalendarPermission -Mailbox "Test1""Test2" -Permission "LimitedDetails"


Exchange 2010 and above Exchange Version
English Version only
PowerShell 2.0


Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.