Feb 07 2023 12:09 AM
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
Feb 07 2023 01:46 AM
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.
Feb 07 2023 01:53 AM
Feb 07 2023 02:15 AM
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.
Feb 12 2023 05:20 PM