Delete Calendar Meeting Appointments from Office 365 Leaver

Introduction

Recently I was asked to help a customer remove meetings from a staff member who had left.   Their Office 365 mailbox had been deleted, but the request was to have that person’s meetings removed from everyone else’s calendars.

Office 365 provide this function via the Exchange Online Azure Powershell module.

The result is achieved by deleting the meetings from all mailboxes, as a cancellation cannot be triggered.   This is preferably anyway as users will not see anything on their screens.

It is advisable to do an initial search to see if the results are as expected, as misuse of this cmdlet can delete content with no warning – test it first!

 

Remove Meetings from Office 365 Commands

This cmdlet will scan all mailboxes starting with “a”, for meetings from Fred Leaver, and log the results in Sarah Admin’s mailbox.

You can also just scan one mailbox as your test – either way is good.

get-mailbox a* |search-mailbox -searchquery ‘(kind:meetings) AND (from:fred.leaver@contuso.com)’ -TargetMailbox “sarah.admin@contuso.com” -TargetFolder “inbox” -LogOnly -LogLevel Full

 

If this gives the desired result then use this cmdlet to delete the content.

get-mailbox a* |search-mailbox -searchquery ‘(kind:meetings) AND (from:fred.leaver@contuso.com)’ -deletecontent

 

Then check the on-screen results.   Continue with “b”  and through the alphabet, to be safe.

get-mailbox b* |search-mailbox -searchquery ‘(kind:meetings) AND (from:fred.leaver@contuso.com)’ -deletecontent

 

If you need any Office 365 expert consulting help, please get in touch.