Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Remove-CalendarEvents: Cancel future meetings in user or resource mailboxes in Office 365

Published on
3,324 Points
Last Modified:
Sunil Chauhan
Expertise in Microsoft Exchange Server, Office 365, and PowerShell scripting, In my spare time I love writing tech blogs and taking photos.
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents

When an employee leaves an organization or decides to take a long vacation, most of the time they tend to forget (or not bother) to cancel any meetings they may have organized. This blocks out otherwise available time in the Resource Mailbox, Meeting Rooms and other Attendee Calendars etc. 

In such situations a support ticket is inevitably raised with the messaging support team, who must then send out cancellation notices from the organizer calendar or manually remove those meetings from the Resource Mailbox, which causes a lot of manual work.

Here's some good news for Office365 admins. Microsoft has just introduced a New PowerShell command line Remove-CalendarEvents

This new command addition gives admins an effective means of cancelling any future meetings in User or Resource Mailboxes in Office 365, substantially cutting down on the amount of manual work required.  Canceling future meetings removes them from Attendee and Resource Calendars.

So, let's look at a few examples of using this new time saving command line.

Example 1:

The following example cancels every meeting that occurs after today's Date in the mailbox of sunil.chauhan@xyz.com

Remove-CalendarEvents -Identity sunil.chauhan@xyz.com -CancelOrganizedMeetings

Example 2:

This example cancels the meetings in Sunil Chauhan's calendar for the specified date range.

Assume Sunil has decided to take a temporary leave of absence. Canceling meetings previously organized removes them from the user and resource calendars during the period that he'll be away.

Remove-CalendarEvents -Identity "Sunil Chauhan" -CancelOrganizedMeetings -QueryStartDate 9-1-2017 -QueryWindowInDays 30

We can also preview any meetings that would be canceled from the user calendar using the example below. 

Example 3:

This example previews the meetings that would be canceled in Sachin's calendar for the specified date range. No changes are made to the mailbox.

Remove-CalendarEvents -Identity "sachin" -CancelOrganizedMeetings -QueryStartDate 9-1-2018 -QueryWindowInDays 60 -PreviewOnly -Verbose

Note: The command doesn't cancel appointments or meetings without attendees or resources.

In this post we explored how we can now cancel meetings in the organizer's Calendar with ease, by utilizing the recently introduced "Remove-CalendarEvents" PowerShell command. 

Microsoft Reference Document Link: Remove-CalendarEvents

I hope this post was informative, please feel free to leave your feedback in the comment section.

Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Join & Write a Comment

This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month