How to use Set CalendarProcessing in PowerShell

The Set CalendarProcessing cmdlet in PowerShell can be used to manage calendar settings on resource mailboxes. The cmdlet can not be used for user mailboxes; for this, you will need to use the Set-MailboxFolderPermission cmdlet.

For the resource mailboxes, the cmdlet allows us to configure the calendar attendant, booking assistant, and other calendar configuration items.

In this article, we will take a look at how to use the Set-CalendarProcessing cmdlet in PowerShell.

Set CalendarProcessing

Resource calendars are mainly used for meeting rooms, but they can also be used for equipment booking. The advantage of a resource calendar compared to a normal calendar is that we can configure different booking policies.

Before we are going to take a look at how to use the cmdlet, let’s first take a brief look at the different options we have when it comes to resource calendars.

  • Automatically accepts meeting requests
  • Remove subject, comments, attachments, or non calendar items from the meeting
  • Add organizer to the subject
  • Set calendar delegates
  • Set booking windows (how many days in advance you can book)
  • Define meeting conflict behaviour
  • Define recurring meetings settings

Requirements

The Set CalendarProcessing cmdlet is part of the Exchange Online module. So, before you start, make sure that you have installed the latest EXO module and connected to Exchange Online.

Adding a Meeting Room Calendar

As mentioned, the cmdlet can only be used on resource mailboxes. If you don’t have a meeting room calendar yet, then we first need to create one. You can do this in the Microsoft 365 Admin Center, under Resources > Rooms & Equipment.

We also use PowerShell to create a meeting room mailbox with the command below:

New-Mailbox -Name "Board Room" -Room

To view the default calendar settings, we can use the Get-CalendarProcessing cmdlet:

Get-CalendarProcessing -Identity BoardRoom | Select *

Setting Calendar Options

With our meeting room created, let’s take a look at the different options that we can configure. At the end, I have added some examples of commonly used scenarios.

Meeting Details

The meeting details are the subject, comments, attachments, and organizer of the meeting. By default, everything is removed from the calendar item. This means that when you open the meeting room calendar, you only see Busy as the subject of the calendar item.

We can use the following parameters to change this:

  • DeleteSubject – Default $true. Set to $false to show the meeting subject
  • DeleteComments – Default $true. Set to $false to show the meeting details
  • DeleteAttachments – Default $true. Set to $false to keep the meeting attachments
  • AddOrganizerToSubject – Default $true. Set to $false to hide the organizer

To keep the subject of the meeting item, we can use the following command:

Set-CalendarProcessing -Identity BoardRoom -DeleteSubject $false

Note

The DeleteSubject, DeleteComments and DeleteAttachements parameters only effect new meetings. So if you set DeleteSubject to $false, then it won’t show the subject on existing meetings.

The AddOrganizerToSubject is enabled by default. But when you look at your new meeting room calendar, you probably notice that you don’t see the organizer. The reason for this is that by default, the users only have the permission AvailabilityOnly on the calendar.

To view the organizer, we will need to give the “default” user a little bit more rights on the calendar. We can do this with the Set-MailboxFolderPermission cmdlet:

Set-MailboxFolderPermission -Identity BoardRoom:\calendar -User Default -AccessRights Reviewer
set calendarprocessing in Powershell
Default (left) – After changing permissions and show the subject (right)

Accepting Meetings

The true strength of the resource calendars is the ability to automatically accept meeting requests based on the booking policy. This policy can be created with a combination of settings, allowing you to tailor the requirements to your needs.

The most important setting is the -AutomateProcessing parameter. By default, this is set to AutoAccept, which will automatically accept a meeting request if there is no conflict.

Other options are:

  • None – Calendar processing is completely disabled
  • AutoUpdate – Meeting requests are placed as tentative, and a delegate will need to approve or decline the meeting
  • AutoAccept – Default option; meetings are accepted based on the other policies.
Set-CalendarProcessing -Identity BoardRoom -AutomateProcessing AutoAccept

Allowing Conflicts

By default, conflicts are not allowed. For a single meeting request, this is often not really an important setting, because the user will see if an option is available immediately when creating the meeting invite.

But when you create a recurring meeting, you often can’t check every date in the future to see if there is already a meeting. This is where the AllowConflicts settings come in.

When set to $true, it will allow a recurring meeting series, regardless of whether there is a conflict with existing bookings. The default $false option is actually more interesting. This option will only decline a meeting series depending on the amount of conflicts in the series.

For this, it uses two other settings to determine if it will decline the request or not: ConflictPercentageAllowed or MaximumConflictInstances.

The setting MaximumConflictInstances, specifies how many conflicts a recurring meeting can have. If it’s 0, then it can’t have any conflicts. You can set this to any number you want, but the default is 0.

The other option is ConflictPercentageAllowed. This is also by default 0, and can be set to any percentage that you want.

Set-CalendarProcessing -Identity BoardRoom -AutomateProcessing AutoAccept -AllowConflicts $false -MaximumConflictInstances 3 -EnableResponseDetails $true

When using one of the options above, I recommend enabling EnableResponseDetails as well. This way, the organizer will receive a notification of each declined occurrence in the meeting series.

Working Hours Only

The setting -ScheduleOnlyDuringWorkHours make sure that a resource can only be booked during working hours. Now, for this setting to be effective, you will need to make sure that the working hours are configured for the resource.

You can check this with the following PowerShell command:

Get-MailboxCalendarConfiguration -Identity boardroom

# Result
Identity  WorkDays WorkingHoursStartTime WorkingHoursEndTime WorkingHoursTimeZone
--------  -------- --------------------- ------------------- --------------------
boardroom Weekdays 08:00:00              17:00:00            W. Europe Standard Time

Make sure that the WorkingHoursTimeZone matches your user’s timezone; otherwise, the hours won’t line up. You can configure the settings with the Set-MailboxCalendarConfiguration cmdlet. Read more about that in this article.

Enable the setting with:

Set-CalendarProcessing -Identity BoardRoom -ScheduleOnlyDuringWorkHours $true

Adding Additional Response

A handy feature of the Set-CalendarProcessing cmdlet, is that you can add an additional response to the confirmation email. For example, you can add information on how to use the resource, or give other additional information.

We will need to set two parameters for this, the first one is -AdditionalResponse. Here, you can add a string with text that you want to add. And the second one is -AddAdditionalResponse which you will need to set to $true to actually add the text to the response

Set-CalendarProcessing -Identity BoardRoom -AdditionalResponse "Make sure to get your own coffee" -AddAdditionalResponse $true

When a user books the resource, the text is shown in the confirmation email:

Set-CalendarProcessing AdditionalResponse

Booking and Request Policy

When you look at the Set-CalendarProcessing cmdlet, you will see multiple parameters related to Book in Policy and Request in Policy. These parameters can be a bit confusing when looking at them, but they are used to manage who can make a booking request and if the request is automatically approved or not.

There are a few differences that you need to know to understand the options:

  • In-policy requests – meeting requests that match the booking rules, like allowed time slots, no conflicts.
  • Out-of-policy requests – do not match the booking rules. For example, it conflicts with another booking or is outside the allowed hours.
  • BookInPolicy – These are users that get auto-approved if they follow the policy
  • RequestInPolicy – Users in this group must always get approval (even if they follow the policy)

To help you even further, I have created an overview of the different parameters and the effect on a meeting request they have:

ParameterEffect When $trueEffect When $false
AllBookInPolicyAll users’ in-policy requests are automatically approved. (Default: $true)All users’ in-policy requests require delegate approval.
AllRequestInPolicyAll users’ in-policy requests must be approved by a delegate.Only users in RequestInPolicy need approval; others are auto-approved.
AllRequestOutOfPolicyAll users’ out-of-policy requests must be approved by a delegate.Only users in RequestOutOfPolicy need approval; others are auto-rejected.
BookInPolicyDefines specific users whose in-policy requests are automatically approved.These users will follow the default AllBookInPolicy setting instead.
RequestInPolicyDefines specific users whose in-policy requests require delegate approval.These users will follow the default AllRequestInPolicy setting instead.
RequestOutOfPolicyDefines specific users whose out-of-policy requests require delegate approval.These users will follow the default AllRequestOutOfPolicy setting instead.

Let’s take a look at some examples to get a better understanding of the different options and how they relate to each other.

By default, booking requests from all users are automatically accepted if they match the booking rule. This is reflected by the parameter -AllBookInPolicy which is set to $true by default:

Set-CalendarProcessing -Identity BoardRoom -AllBookInPolicy $true

Require Approval for Every Meeting Request

If we want every meeting request to be approved by a delegate, then we need to set the parameter -AllRequestInPolicy to $true and the -AllBookInPolicy to $false. You will also need to make sure that one or more delegates are configured for the resource calendar:

Set-CalendarProcessing -Identity BoardRoom -AllBookInPolicy $false -AllRequestInPolicy $true -ResourceDelegates "john@lazyadmin.nl"

Require Approval for Meeting Requests out of Policy

By default, meeting requests that are out of policy are declined automatically. Now, let’s say you have a resource calendar where users can book a company car. The car can only be used during work hours, so you have set -ScheduleOnlyDuringWorkHours to $true.

If users want to book the car outside working hours, they will need to ask for approval. To solve this, we can use the parameter -AllRequestOutOfPolicy. We can set this to $true, which will allow users to submit an out-of-policy request, which requires approval by the resource mailbox delegate

Set-CalendarProcessing -Identity Car02 -AllRequestOutOfPolicy $true -ResourceDelegates "john@lazyadmin.nl" -ScheduleOnlyDuringWorkHours $true

Only Allow Specific Users to Book

The parameters -BookInPolicy and -RequestInPolicy allow to configure which users are allowed to make/use the resource booking calendar.

If you, for example, have a meeting room that can only be used by the sales managers or a resource that can only be booked by specific users, then we can set the AllBookInPolicy to $false and specify the users who are allowed to make a booking request.

Use the BookInPolicy parameter when you don’t need additional approval, and the RequestInPolicy parameter when the request needs to be approved by a delegate.

# Only allow Adele and Megan to book the company car
Set-CalendarProcessing -Identity Car02 -AutomateProcessing AutoAccept -BookInPolicy "adelev@lazyadmin.nl","meganb@lazyadmin.nl" -AllBookInPolicy $false

# Only allow members of the group "Sales" to book the conference room and require approval by delegate
Set-CalendarProcessing -Identity "Sales Room" -AutomateProcessing AutoAccept -RequestInPolicy "Sales Management" -AllBookInPolicy $false -ResourceDelegates "john@lazyadmin.nl"

If a user who isn’t a member of the sales group tries to book the meeting room, they will automatically get an email that the request is declined:

Resource calendar setting with set calendarprocessing

Combining All the Settings

Now that we have discussed all the different options, let’s take a look at the complete and more complex configuration to show you the possibilities.

Below, you will see the set calendarprocessing configuration for the board room. I have used splatting to make the settings more readable:

$roomSettings = @{
    "Identity" = "Board Room"
    "ScheduleOnlyDuringWorkHours" = $true
    "EnforceCapacity" = $true
    "AllowConflicts" = $false
    "MaximumConflictInstances" = 3
    "BookingWindowInDays" = 90
    "EnableResponseDetails" = $true
    "AutomateProcessing" = "AutoAccept"
    "BookInPolicy" = "Management"
    "AllBookInPolicy" = $false
    "RequestInPolicy" = "Sales Management"
    "AllRequestOutOfPolicy" = $false
    "RequestOutOfPolicy" = "Management"
    "ResourceDelegates" = "jane@lazyadmin.nl"
}
Set-CalendarProcessing @roomSettings

Let’s break down the settings to see the effect on the resource calendar:

  • Only during work hours → The room can only be booked within working hours (ScheduleOnlyDuringWorkHours = $true).
  • No overbooking → The room cannot be booked beyond its capacity
    (EnforceCapacity = $true).
  • No conflicting meetings → The room won’t allow double-bookings
    (AllowConflicts = $false).
  • Limited conflict exceptions → If conflicts are allowed, a max of 3 overlapping instances is permitted (MaximumConflictInstances = 3).
  • Booking window: 90 days → Users can only book up to 90 days in advance (BookingWindowInDays = 90).
  • Send detailed responses → When a request is accepted/declined, the response email includes details (EnableResponseDetails = $true).
  • Auto-accept bookings → The system automatically processes and accepts meeting requests that fit the policy (AutomateProcessing = “AutoAccept”).

Who Can Book the Room?

  • Management can book automatically → Their requests are immediately approved as long as they follow booking rules (BookInPolicy = “Management”).
  • Sales Management needs approval → Even if their request follows the rules, a delegate must approve it (RequestInPolicy = “Sales Management”).
  • Everyone else is blocked → Since AllBookInPolicy = $false, users who are not in BookInPolicy or RequestInPolicy cannot book the room at all.
  • Management can request out-of-policy bookings, but requires approval → If Management tries to book outside the allowed rules, they still need delegate approval (RequestOutOfPolicy = “Management”).

Who Approves Requests?

  • Jane (@lazyadmin.nl) is the delegate → She handles approvals for any request that requires manual review (ResourceDelegates = “jane@lazyadmin.nl“).

Wrapping Up

Even though we can set a few of the options in the Microsoft 365 Admin center for the resource mailboxes, the set-calendarprocessing cmdlet really allows you to fine-tune the settings.

Hope this article helped you with configuring your resource calendar, if you have any questions, just drop a comment below.

Enjoying the article but hate the ads? Join the Insiders for a clean, ad-free experience ($1), or go Elite ($3) to get priority answers and more.

Join LazyAdmin

Enjoying the article but hate the ads? Join the Insiders for a clean, ad-free experience ($1), or go Elite ($3) to get priority answers and more.

Join LazyAdmin

Leave a Comment