Forum Discussion
tyagia2ul
Feb 07, 2023Copper Contributor
How to remove meeting invite sent by user who left the organization
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...
AndySvints
Feb 07, 2023Steel Contributor
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.
- tyagia2ulFeb 07, 2023Copper ContributorThanks 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.- AndySvintsFeb 07, 2023Steel Contributor
In this case you should use New-ComplianceSearch. As Search-Mailbox cmdlet is being deprecated in favor of New-ComplianceSearch
Approach is the following:
- create a content search using the New-ComplianceSearch
- run it using the Start-ComplianceSearch cmdlet
- assign a search action to the search using the New-ComplianceSearchAction cmdlet.
Hope that helps.
- tyagia2ulFeb 13, 2023Copper ContributorThanks , I am able to delete the meeting now .