Cancel / Remove Calendar items for account that no longer exists

Deleted
Not applicable

Hi, 

We have a user that started with us a couple of months ago, and when her account was first created our outsourced IT partners set her email up using the @onmicrosoft  email address instead of the company domain. Besides the simple fix to simply adjust this, our IT partners decided in their wisdom to delete her old account and create a new one (insert facepalm icon here).

 

The problem is that she had some meetings booked (some recurring, some one-offs) in rooms and with other team members using her old account. 

 

Our IT partners have contacted Microsoft after apparently attempting to find a solution and were advised by Microsoft that there is no way of using a script to query EOL and remove those entries.  I have to say, I find this hard to believe, so I'm turning to this community group to ask if it is at all possible to query and remove stale/orphaned meetings that have been created using this old, deleted account.

 

I have looked into the 'Remove-CalendarEvents' cmdlet as well as various 'Get-Mailbox' scripts I found dotted around the web, none of which seemed to do the job.

 

Can anyone advise on this, and whether in fact it is possible or not? Strikes me as something that could happen fairly often in businesses all over the world each and every day? 

1 Reply

Remove-CalendarEvents will only work if the user object still exists. You can use Search-mailbox to target all items created by that account, however using this method you can only delete them, not cancel the actual meetings. Some EWS-based script can also be used with the same effect. For proper cancellation however, you need to either be the organizer, or be able to impersonate the organizer.