How to Manage Calenders in Exchange Online using PowerShell

Introduction :

Managing calendars in Exchange Online can be a complex task, especially since certain calendar management functions are not available through the GUI of the Admin Center. However, with the power of PowerShell, these tasks become much more manageable and efficient.

This guide aims to provide IT administrators and professionals with the necessary tools and commands to streamline calendar management. Whether you’re looking to automate tasks, troubleshoot issues, or enhance productivity, this guide will walk you through the essential steps and best practices to achieve your goals.

Keep in mind :

You need to execute everytime “Get-MailboxFolderStatistics” command to know calendar folder name, because it change with mailbox language.

# Get mailbox folders to get calender folder name
(Get-MailboxFolderStatistics "user@domain.com" -FolderScope Calendar).Identity

1 – Connect to Exchange Online :

Install the necessary module for Exchange Online :

Install-Module ExchangeOnlineManagement –Force

To connect to exchange online you need to execute this :

# Import ExchangeOnlineManagement module
Import-Module ExchangeOnlineManagement

Connect-ToExchangeOnline 

You can use this optimized function to check if module is installed or not, import module then connect to Exchange online, I recommend using this function.

function Connect-ToExchangeOnline 
{
    # Check if the module is installed
    if (!(Get-Module -ListAvailable -Name ExchangeOnlineManagement)) 
    {
        Write-Host "The ExchangeOnlineManagement module is not installed. Installation in progress..." -ForegroundColor Yellow
        Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber
    }
    # Import ExchangeOnlineManagement module
    Import-Module ExchangeOnlineManagement

    # Connect to Exchange online
    Connect-ExchangeOnline 
}

Connect-ToExchangeOnline 

you should see this windows after executing the behavior function.

2 – Get mailbox folders to get calender folder name :

this command is used the calendar folder name, because sometime it depends on language of the mailbox (it can be : “Calendrier” , “Calendar” …etc) so we need the name of this calender folder.

# Get mailbox folders to get calender folder name
(Get-MailboxFolderStatistics "user@domain.com" -FolderScope Calendar).Identity
  • As we can see here the name is “Calendar” :

3 – View Mailbox Calendar Permissions :

We need to see the existing permissions on the calendar before proceeding to any other step, which is why this step is important, because if we want to add accesses for a user when this user already has an access, the command will display an error.

Get-MailboxFolderPermission "aymen@globalitnow.com:\Calendar"

As you can see here, we have default permission access for availibility only with no more details.

4 – Add Calendar Permission :

Before adding permissions, let’s Understanding Outlook Calendar Permissions :

When managing calendar and Outlook folder permissions, you can use the following predefined permissions levels :

  • Owner — gives full control of the mailbox folder: read, create, modify, delete items/folders, and manage permissions;
  • PublishingEditor — read, create, modify, and delete items/subfolders (all permissions, except the right to change permissions);
  • Editor — read, create, modify, and delete items (can’t create subfolders);
  • PublishingAuthor — create, and read all items/subfolders. You can modify and delete only items that you have created;
  • Author — create and read items. Edit and delete own items;
  • NonEditingAuthor — full read access, and create items. You can delete only your own items;
  • Reviewer — read only folder items ;
  • Contributor — create items and folders (can’t read items);
  • AvailabilityOnly — read Free/Busy time from the calendar;
  • LimitedDetails — view the availability, subject and location of appointments in the calendar;
  • None — no permissions to access folders and files.

Adding Calendar Permissions :

In order to grant user2 the permission to view and edit user1 calendar items, use the following command :

Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Editor

In order to grant user2 the permission to view user1 calendar items, use the following command :

Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Reviewer
Add-MailboxFolderPermission -Identity "aymen@globalitnow.com" -user "t.collins@globalitnow.com"  -AccessRights Reviewer

if we check Aymen calendar permission again, we can see that taylor have Reviewer right :

5 – Set Calendar Permission :

we set a calendar permission only if the user already has an existing permission that we’re going to modify.

  • in this example we gonna change Tailor Permission from Reviewer to Editor :
Set-MailboxFolderPermission -Identity "aymen@globalitnow.com:\Calendar" -user t.collins@globalitnow.com  -AccessRights Editor
  • if we check Aymen calendar permission again, we can see that taylor have Editor right :

6 – Remove Calendar Permission :

in this example we gonna remove Tailor editor permission to restore the first status permission of Aymen calendar.

Remove-MailboxFolderPermission -Identity "aymen@globalitnow.com:\Calendar" -user "t.collins@globalitnow.com"
  • if we check Aymen calendar permission again, we can see that taylor is no longer available in permission list :

Thanks

Aymen EL JAZIRI (Microsoft MVP)
Aymen EL JAZIRI (Microsoft MVP)

Hi, I’m Aymen El Jaziri , a passionate System Administrator and Microsoft MVP, with years of hands-on experience in managing and securing modern IT infrastructures.
This blog is where I share technical guides, automation scripts, product reviews, and real-world solutions that help IT professionals simplify their day-to-day work and stay ahead in a fast-evolving cloud ecosystem.
Whether you’re here to troubleshoot an issue, improve your automation game, or learn new best practices , welcome in my blog !
Let’s build a stronger, smarter IT community together.
Feel free to connect with me on LinkedIn for more content, discussions, or collaboration opportunities.

Thanks

Aymen

Articles: 154