How to Set-CalendarProcessing in Powershell

How to Set-CalendarProcessing in Powershell

Managing a Microsoft Exchange Server can be a daunting task if you don’t know how to do it.

Imagine having to manage mailbox-specific calendars in Outlook one by one - this doesn’t sound so bad if your organization consists of a few users, but if you work in a medium-sized or big company, then time is of the essence.

Fortunately, there’s an option to manage and modify calendar processing options for resource mailboxes via PowerShell: the Set-CalendarProcessing cmdlet.

Calendar configuration has never been so easy, so today, we are going to show you how to use Set-CalendarProcessing in PowerShell by following some quick and straightforward steps.

What is Set-CalendarProcessing Command?

Set-CalendarProcessing is a cmdlet available on-premises Exchange and in the cloud-based service that users can run on PowerShell (Linux, macOS, Windows).

This cmdlet is a useful resource commonly used in an Exchange Organization to control calendar items, meeting requests, and other calendar settings for group and specific resource mailboxes.

Set-CalendarProcessing is an advanced cmdlet that consists of many different parameters and switches that can be modified by an administrator.

Understanding the Set-Calendar Processing Command in PowerShell

Before using the Set-CalendarProcessing command in PowerShell, it is advisable to understand what each switch and parameter means.

This way, administrators, meeting organizers, and managers can participate in the only decisions (and permissions) configured on certain mailboxes.

This is the syntax of the Set-CalendarProcessing command:

Set-CalendarProcessing

   [-Identity] <Room MailboxIdParameter>

   [-AddAdditionalResponse <Boolean>]

   [-AdditionalResponse <String>]

   [-AddNewRequestsTentatively <Boolean>]

   [-AddOrganizerToSubject <Boolean>]

   [-AllBookInPolicy <Boolean>]

   [-AllowConflicts <Boolean>]

   [-AllowRecurringMeetings <Boolean>]

   [-AllRequestInPolicy <Boolean>]

   [-AllRequestOutOfPolicy <Boolean>]

   [-AutomateProcessing <CalendarProcessingFlags>]

   [-BookingType <ResourceBookingType>]

   [-BookingWindowInDays <Int32>]

   [-BookInPolicy <RecipientIdParameter[]>]

   [-Confirm]

   [-ConflictPercentageAllowed <Int32>]

   [-DeleteAttachments <Boolean>]

   [-DeleteComments <Boolean>]

   [-DeleteNonCalendarItems <Boolean>]

   [-DeleteSubject <Boolean>]

   [-DomainController <Fqdn>]

   [-EnableAutoRelease <Boolean>]

   [-EnableResponseDetails <Boolean>]

   [-EnforceCapacity <Boolean>]

   [-EnforceSchedulingHorizon <Boolean>]

   [-ForwardRequestsToDelegates <Boolean>]

   [-IgnoreDefaultScope]

   [-MaximumConflictInstances <Int32>]

   [-MaximumDurationInMinutes <Int32>]

   [-MinimumDurationInMinutes <Int32>]

   [-OrganizerInfo <Boolean>]

   [-PostReservationMaxClaimTimeInMinutes <Int32>]

   [-ProcessExternalMeetingMessages <Boolean>]

   [-RemoveCanceledMeetings <Boolean>]

   [-RemoveForwardedMeetingNotifications <Boolean>]

   [-RemoveOldMeetingMessages <Boolean>]

   [-RemovePrivateProperty <Boolean>]

   [-RequestInPolicy <RecipientIdParameter[]>]

   [-RequestOutOfPolicy <RecipientIdParameter[]>]

   [-ResourceDelegates <RecipientIdParameter[]>]

   [-ScheduleOnlyDuringWorkHours <Boolean>]

   [-TentativePendingApproval <Boolean>]

   [-WhatIf]

   [<CommonParameters>]



As you can see, this is a very complex syntax with several switches that can be modified to change default values.

These are the meanings of some of the most important switches present in the command syntax:

  • Identify: This switch identifies the mailbox for which you wish to configure calendar processing settings;
  • AutomateProcessing: Sets the automatic processing level for meeting requests on certain mailboxes. The switch includes AutoUpdate (meeting organizers receive approval or rejection from delegates) and AutoAccept (the Calendar Attendant automatically updates the calendar by following policies on the resource booking assistant, and then organizers receive the decision based on free (accept) and busy (decline) parameters;
  • AddOrganizerToSubject: Determines whether the meeting organizers are added to the subject of normal or recurring meetings;
  • DeleteComments: Deletes certain comments from normal or recurring meeting requests;
  • BookingPolicy: Specifies the overall booking policies for an individual or room mailbox;
  • ProcessExternalMeetingMessages: Controls the processing of any meeting request from external users or senders;
  • ResourceDelegates: Lists all the delegates who can manage mailbox’s resource booking features;
  • RequestInPolicy and RequestOutOfPolicy: Determines recipients who are allowed or not allowed to book the specific mailbox;
  • EnforceSchedulingHorizon: Enforces a scheduling horizon that limits how far in the future meetings can be scheduled;
  • TentativePendingApproval: Controls whether tentative meetings need to be accepted or rejected;
  • ForwardRequestsToDelegates: Determines whether meeting requests are forwarded to each delegate or not;
  • MaximumDurationInMinutes and MinimumDurationInMinutes: Determines the minimum and maximum duration of meetings for a certain meeting room;
  • EnableResponseDetails: Controls when responses are enabled or disabled for certain mailboxes - it’s controlled by $true or $false boolean parameters;
  • DomainController: Specifies the domain controller used to write and rewrite groups of mailboxes as requested.

What is Get-CalendarProcessing Command?

Another useful cmdlet that works closely with Set-CalendarProcessing is the Get-CalendarProcessing command.

The Get-CalendarProcessing command can be used to view the calendar processing options for resource mailboxes.

Therefore, instead of managing rooms, modifying calendars, and altering permissions on mailboxes, the Get-CalendarProcessing cmdlet works to view the current permissions and options that already exist on these resource mailboxes.

This way, it is possible to get full insights before making any changes to calendar processing levels before using the Set-CalendarProcessing command.

This is the syntax of the Get-CalendarProcessing cmdlet for PowerShell:

Get-CalendarProcessing

   [-Identity] <MailboxIdParameter>

   [-DomainController <Fqdn>]

   [-ReadFromDomainController]

   [-ResultSize <Unlimited>]

   [<CommonParameters>]




What is Set-Calendar Processing PowerShell Command Useful For?

There are different great uses for the Set-CalendarProcessing command on PowerShell, such as the following:

  1. Automatically accept or decline meeting requests;
  2. Set working hours for each member;
  3. Booking delegates for mailboxes;
  4. Create new calendar processing options;
  5. Specific which members and view free and busy options;
  6. Customize resource scheduling (such as booking requests and more).

It is clear that using the Set-CalendarProcessing cmdlet is a great way to perform otherwise slow tasks that would be time-consuming via the classic Microsoft Exchange features.

Therefore, learning how to use this command provides administrators with great advantages in Exchange Online environments.

Prerequisites Before Using Set-CalendarProcessing in PowerShell

In order to use PowerShell cmdlets, you need to have administrator access to a Microsoft Office 365 or Exchange organization.

This way, it is possible to configure individual and room mailboxes by using PowerShell commands.

Additionally, note that Microsoft says that administrators can check the necessary permissions to use certain commands by following these quick three steps:

  1. Open PowerShell on your computer and make sure to connect to the correct Microsoft account;
  2. Launch the Commands Window on PowerShell, and run the following command: “$Perms = Get-ManagementRole -Cmdlet <Cmdlet>.” In this command setting, replace Cmdlet with “Set-CalendarProcessing” before running it;
  3. Check out the response - the results will show you the type of entity, role, and permissions required in order to get approved for using the command. Keep in mind that you can request the necessary role from administrators, as they are the only ones who can assign roles to internal and external users of an organization.

How to Use Set-CalendarProcessing in PowerShell

After understanding the syntax, parameters, and switches of the Set-CalendarProcessing command, we are finally ready to use it.

We are going to view overall calendar processing options with the Get-CalendarProcessing command, and then we will make changes to these options by employing the Set-CalendarProcessing cmdlet.

These are the main three steps to follow.

Step 1: Connect to the Exchange Online PowerShell Module

The first step consists of connecting to the Exchange Online PowerShell module. To do this, keep in mind that it’s necessary to have administrator roles with sufficient permissions.

Go to the PowerShell window on your computer and run this command:

Connect-ExchangeOnline -UserPrincipalName [email protected]


Don’t forget to replace the [email protected] part with your admin email.

Log into your Office account by using your credentials, and then you’ll be ready to start using all kinds of PowerShell commands.

Step 2: Use Get-CalendarProcessing to Show Current Calendar Processing Options

The best way to make any changes without compromising the stability of existing mailboxes is to view the current processing options before modifying anything.

Therefore, run the Get-CalendarProcessing command to see the present settings available.

Let’s take a look at an example:

Get-CalendarProcessing -Identity "Room 117" | Format-List


In this example, the command will return all the calendar processing options for resource mailbox Room 117.

Although using the Get-CalendarProcessing command is optional, doing so ensures that you will be later modifying the correct resource mailbox instead of the wrong one.

Step 3: Run the Set-CalendarProcessing Command

After ensuring that everything is in order by using the Get-CalendarProcessing cmdlet, we are now going to make changes to resource mailboxes.

In this example, we’ll run the Set-CalendarProcessing command to modify individual resource mailboxes:

Set-CalendarProcessing -Identity "Room 117" -AutomateProcessing AutoAccept -DeleteComments $true -AddOrganizerToSubject $true -AllowConflicts $false


This example works to automate the process of calendar requests for the resource mailbox Room 117:

  • The AutoAccept parameter after AutomateProcessing works to enable calendar processing automatically;
  • The DeleteComments switch set to true removes the text in the body of incoming requests to accelerate the process;
  • The AddOrganizerToSubject switch adds the name of the organizer to the subject of the meeting request automatically;
  • Finally, the AllowConflicts switch set to false prevents conflicts from taking place on the meeting requests for Room 117.

Additionally, it is also possible to modify resource mailboxes for entire groups instead of individual items.

Let’s take a look at the following example:

$group = New-DistributionGroup "Room 117 Workers"

Update-DistributionGroupMember -Identity $group.Identity -Members [email protected],[email protected] -BypassSecurityGroupManagerCheck:$true

Set-CalendarProcessing -Identity "Room 117" -AutomateProcessing AutoAccept -BookInPolicy $group.Identity -AllBookInPolicy $false


By integrating the Group syntax above Set-CalendarProcessing, the subsequent command can be modified to affect a whole distribution group via PowerShell.

In the aforementioned example, the cmdlet automatically rejects meeting requests from external users who are not members of the “Room 117 Workers” group.

Summary: Using Set-CalendarProcessing Cmdlet

Organization managers can take advantage of all the benefits provided by PowerShell commands.

Before viewing or managing calendar processing options in resource mailboxes, keep in mind the following three factors:

  1. Get-CalendarProcessing is a cmdlet that works to see the current calendar processing settings on resource mailboxes - use it before making any changes to ensure a smooth and safe process;
  2. Set-CalendarProcessing works to modify and alter the existing settings on calendar processing options for both individual resource mailboxes and groups;
  3. The Set-CalendarProcessing cmdlet can be further modified to automate meeting requests, change delegates, apply permissions, and more.

FAQ

Why Can’t I Run PowerShell Cmdlets?

If you are unable to run PowerShell cmdlets, check if you have the necessary role to run certain commands. Additionally, ensure that you have administrator permissions and make sure you are logged into the correct Microsoft account.