How to remove meeting invite sent by user who left the organization

Copper Contributor

We have a user who left the company back in December 22 and there are couple of re occuring meeting which i want to delete . I tried "search - mailbox - search query "  but it's not working if anyone can help me the script to delete the meeting invites .

 

Amy help would be highly appreciated.

 

Thanks,

Atul 

6 Replies

Hello @tyagia2ul,

If mailbox still exist on your tenant you can use Remove-CalendarEvents cmdlet.

Code will be something similar to this:

#First check which meetings you will be removing using -PreviewOnly parameter
Remove-CalendarEvents -Identity "<User>" -CancelOrganizedMeetings -QueryWindowInDays 120 -PreviewOnly -Verbose

#Remove all meetings that occurs on or 120 days after today's date
Remove-CalendarEvents -Identity "<User>" -CancelOrganizedMeetings -QueryWindowInDays 120 -PreviewOnly -Verbose

Please note you will need to have access to that mailbox to run it. 

Hope that helps.

 

Thanks @AndySvints,

The mailbox does not exist this user left the company back in Dec22
Any script through which we can search the meeting and delete.

@tyagia2ul,

In this case you should use New-ComplianceSearch. As Search-Mailbox cmdlet is being deprecated in favor of New-ComplianceSearch

Approach is the following:

 

Hope that helps.

Thanks , I am able to delete the meeting now .

Could someone elaborate on how to use those commands to delete the calendar events? I've read through the links provided but am unsure on how to use them to delete the calendar events. I'm having the same issue with a regularly recurring meeting from a user who no longer has any kind of account.