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


When employee leaves the organization or go a long vacation, most of the time they forget to cancel the meeting which they had organized, which blocks the time on the Resource Mailbox, Meeting Room or on other attendees calendar etc, in that situation there is always a support ticket opened with the messaging support team, where the messaging support team sends cancellation from the organizer calendar or remove the meetings from the Resource Mailbox, which requires a lot of manual Job.

Here is the good news for the Office365 admins, Microsoft has just introduced a New PowerShell command line Remove-CalendarEvents,  this will cancel future meetings in user or resource mailboxes in Office 365. 

Canceling future meetings removes them from attendee and resource calendars.

So, Let's further see few example of using this command Line.

Example 1:

This 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.

Sunil is taking a temporary leave, canceling these meetings removes them from the user and resource calendars during her absence.

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

We can also preview the meeting which will be canceled from the user calendar in below example I am going to demonstrate the same.

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: It doesn't cancel appointments or meetings without attendees or resources.

In this post we have learned how can we now cancel meetings in the organizer's Calendar using the PowerShell command. I hope this post was informative, please feel free to leave your feedback in the comment section.

Comments