Using set-MailboxCalendarFolder in Powershell

Using set-MailboxCalendarFolder in Powershell

Whether you’re working with an on-premises Exchange Server or Exchange Online within Microsoft 365, it's essential to understand how Set-MailboxCalendarFolder controls calendar information sharing within your organization or with external partners.

The Set-MailboxCalendarFolder cmdlet lets you tailor calendar settings for different users or departments, like setting up secure sharing for executives or making team calendars accessible across the organization. In this guide, we’ll cover the key features of Set-MailboxCalendarFolder, including use cases and step-by-step instructions for managing calendar permissions in PowerShell.

What is the Set-MailboxCalendarFolder Cmdlet in PowerShell?

The Set-MailboxCalendarFolder cmdlet in PowerShell is used in Microsoft Exchange Online and Exchange Server to manage calendar sharing settings for a user's mailbox. With this cmdlet, administrators can control who can view or edit a calendar and set up sharing with others, including external recipients. It's used to manage calendar access across an organization, ensuring that permissions are consistent for multiple users or groups.

Here’s the syntax of Set-MailboxCalendarFolder along with a brief explanation of each parameter:

Set-MailboxCalendarFolder

[-Identity] <MailboxFolderIdParameter>

[-Confirm]

[-DetailLevel <DetailLevelEnumType>]

[-DomainController <Fqdn>]

[-PublishDateRangeFrom <DateRangeEnumType>]

[-PublishDateRangeTo <DateRangeEnumType>]

[-PublishEnabled <Boolean>]

[-ResetUrl]

[-SearchableUrlEnabled <Boolean>]

[-SetAsSharingSource]

[-SharedCalendarSyncStartDate <DateTime>]

[-UseHttps]

[-WhatIf]

[<CommonParameters>]

  • Set-MailboxCalendarFolder: The cmdlet used to configure settings for a mailbox calendar folder in Exchange.
  • -Identity <MailboxFolderIdParameter>: Specifies the mailbox and calendar folder that you want to configure.
  • -Confirm: Prompts for confirmation before executing the cmdlet.
  • -DetailLevel <DetailLevelEnumType>: Sets the level of detail (e.g., availability only, limited details, or full details) to be published in the calendar.
  • -DomainController <Fqdn>: Specifies the fully qualified domain name (FQDN) of the domain controller that writes the changes to Active Directory.
  • -PublishDateRangeFrom <DateRangeEnumType>: Defines the starting point of the date range to publish in the calendar.
  • -PublishDateRangeTo <DateRangeEnumType>: Defines the end point of the date range to publish in the calendar.
  • -PublishEnabled <Boolean>: Enables or disables the calendar for publishing.
  • -ResetUrl: Resets the URL used for publishing the calendar.
  • -SearchableUrlEnabled <Boolean>: Controls whether the calendar's published URL is searchable on the web.
  • -SetAsSharingSource: Designates the calendar folder as a sharing source, allowing it to be shared with others.
  • -SharedCalendarSyncStartDate <DateTime>: Specifies the start date from which calendar data should be synchronized for sharing.
  • -UseHttps: Ensures that the calendar is published using HTTPS for secure access.

What Can You Use Set-MailboxCalendarFolder For?

The Set-MailboxCalendarFolder cmdlet can be used for a variety of administrative tasks in managing calendar permissions in Exchange environments, such as these:

  1. Setting Default Calendar Permissions: An administrator can use this cmdlet to set the default calendar sharing permissions for all users in an organization. For example, it can be used to ensure that all calendars are shared with read-only access to everyone within the organization, providing a standardized level of visibility across the company.
  2. Granting Access to a Delegate: The cmdlet can be used to grant specific permissions to a delegate, such as an executive assistant, to manage an executive's calendar. For instance, the cmdlet can allow the assistant to edit, create, or delete calendar items on behalf of the executive.
  3. Configuring External Sharing Settings: If an organization needs to allow external users to view certain calendars, the cmdlet can be used to configure these sharing permissions.

3 Prerequisites to Run Set-MailboxCalendarFolder in PowerShell

To run the Set-MailboxCalendarFolder cmdlet, certain prerequisites and permissions are required:

  • Assigned Permissions: Before you can run the cmdlet, you need to be assigned the appropriate permissions in your Exchange environment. These permissions determine which parameters and actions you can perform with the cmdlet. If you lack the necessary permissions, you will not have access to all parameters or be able to execute the cmdlet at all.
  • Calendar Folder Configuration: The cmdlet is used to configure various aspects of a mailbox calendar folder, including enabling or disabling calendar publishing, setting the date range for publishing, choosing the level of detail to publish (such as free/busy information or full details), and enabling or disabling the calendar's published URL for web searches.
  • Role-Based Access Control (RBAC): The permissions needed to run this cmdlet are managed through Role-Based Access Control (RBAC) in Exchange. Depending on your role (for instance, Exchange administrator, helpdesk operator), you may have access to different parameters and capabilities.

How to Use Set-MailboxCalendarFolder in PowerShell in 3 Steps

To effectively use Set-MailboxCalendarFolder, you just need to follow three quick steps.

Step 1: Connect to Exchange Online via PowerShell and Review Necessary Permissions

First of all, we need to use the appropriate cmdlet to connect to your Exchange environment. For Exchange Online, use:

Connect-ExchangeOnline -UserPrincipalName [email protected]

Replace your email in the cmdlet, use your credentials, and you’ll be logged into the environment.

Then, ensure that you have the required permissions (which involves determining which roles in your organization can use the cmdlet), and move on to the following step.

Step 2: Identify the Target Mailbox and Calendar Folder

Once permissions are in place, the next step is to identify the mailbox and calendar folder that you want to configure.

If you're unsure of the exact folder name or path, you can list the calendar folders in a mailbox using the Get-MailboxFolder cmdlet. Run this command as follows:

Get-MailboxFolder -Identity [email protected]:\Calendar


Replace [email protected] with the target user's email address and ensure that the folder exists and is correctly identified to avoid errors when running the Set-MailboxCalendarFolder cmdlet.

Step 3: Run the Set-MailboxCalendarFolder Cmdlet with Desired Parameters

Now that you have the necessary permissions and have identified the target folder, you can run the Set-MailboxCalendarFolder cmdlet to configure the calendar folder's publishing settings.

Consider the following example:

Set-MailboxCalendarFolder -Identity James:\Calendar -DetailLevel LimitedDetails

This command configures the calendar folder named "Calendar" in the mailbox of user "James" to publish calendar details with limited visibility.

Here’s another example:

Set-MailboxCalendarFolder -Identity Simon:\Calendar -SearchableUrlEnabled $true

This cmdlet enables the calendar folder named "Calendar" in the mailbox of user "simon" to be searchable via its published URL on the web.

After running the cmdlet with your chosen parameters, ensure that the changes have been applied correctly.

You can do this by checking the calendar's sharing settings either via EMS or through the Outlook Web App (OWA).

Wrapping Up: Managing Mailbox Folders and Permissions with Set-MailboxCalendarFolder

As you can see, the Set-MailboxCalendarFolder cmdlet in PowerShell is an essential tool for managing calendar permissions and sharing settings within Microsoft Exchange environments. Here’s a quick summary of some of the most important things we have discussed in this guide so far:

  • Granular Control: Set-MailboxCalendarFolder provides detailed control over calendar publishing and sharing settings, enabling administrators to align calendar access with organizational policies.
  • Customization for Users: The cmdlet supports customization to meet different needs, whether for individual users or larger groups, ensuring flexibility in calendar management.Permission Management: Proper use of the cmdlet requires appropriate permissions, highlighting the importance of role-based access control (RBAC) in Exchange environments.