[Exchange Online] Remove cancelled Outlook meetings using PowerShell and EWS!


Actually it is 23:13 CEST, but still!

Some time ago I have published a script to remove cancelled calendar meetings from Exchange OnPremise (I have tested that on Exchange 2010).You can find this script here:


I am currently at the end of the migration to Exchange Online from Exchange 2010 environment. Few days ago I had a call telling me that seems that the cancelled meetings are not being removed from room calendars as they supposed to be.

Yup, I forgot to rewrite the script…


I needed to prepare it to work on Exchange Online, additionally I made some code changes like converting this script to a function etc.

As the outcome there is a function O365_EON_DeleteCanceledMeetings.

Same as for the OnPremise script you need to set up few variables:

  1. Credentials to log in to Exchange Online Powershell session


2. Log files target location and EWS dll location (I uploaded my dll on github), EWSURL is universal for all tenants.


There is also a need of:

1. Creating Distibution Group that contains rooms

2. Creating  Exchange Management Scope

3. Creating impersonation permissioned security group in Active Directory

4. Creating new Exchange Assigment Role

All steps for above tasks can be found here:


Function is really simple but if you have any questions please let me know.

Code can be found on my Technet and GitHub

One thought on “[Exchange Online] Remove cancelled Outlook meetings using PowerShell and EWS!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s