Forum Discussion
How to delete all calendar appointments booked by terminated users?
This is less complicated and worked perfectly:
Search-Mailbox -Identity simpleuser@abc.com -SearchQuery 'kind:meetings AND From:user@abc.com' -DeleteContent
Kerry Loftus It looks like Search-Mailbox is deprecated. What would be the new command for this?
New-ComplianceSearchAction does not seem to have a delete function.
- alexrabbiJul 02, 2023Brass Contributor
Ray_Gonzalez this command worked for me, but it took longer time than i expected
Remove-CalendarEvents -Identity "Angela Gruber" -CancelOrganizedMeetings -QueryStartDate 11-1-2018 -QueryWindowInDays 120
- Ray_GonzalezJul 02, 2023Copper ContributorWhat was the solution?
- alexrabbiMar 29, 2023Brass ContributorHi All,
This finally worked, it took some time but all the above worked for me - alexrabbiMar 05, 2023Brass ContributorHi All,
I tried all the below coomand and waited for couple of days, but meeting invites are not deleted
Remove-CalendarEvents -Identity email address removed for privacy reasons -CancelOrganizedMeetings -QueryWindowInDays 120
Remove-CalendarEvents -Identity "Angela Gruber" -CancelOrganizedMeetings -QueryStartDate 11-1-2018 -QueryWindowInDays 120
Remove-CalendarEvents -Identity "Jacob Berger" -CancelOrganizedMeetings -QueryStartDate 9-1-2018 -QueryWindowInDays 90 -PreviewOnly -Verbose
Am i doing anything wrong here?
REgards,
Alex - James260Nov 08, 2022Copper ContributorI'm seeing various blogs/posts on this general issue that go back around 10 years, perhaps more.
Does Microsoft have a way to deal with this that handles the necessary nuances? If not, what is the reason for not doing this?
- for example, organizer long since deleted and not under litigation hold... was removed midstream of a meeting series they organized. Meetings occurances that were held should not be deleted from peoples calendar (history), but future (based on an as of date perhaps) meeting occurances need to be rejected (by attendee) or the meeting cancelled (vs just deleted) or the "end date" of the series adjusted properly.
- just highlighting some scenarios, ... I'm sure there are more nuances to be handled.
Note, I have successfully used Remove-CalendarEvents after restoring a deleted user that was deleted within the past 30 days. However, this too does not seem ideal, as that is monkeying around with the deleted user's mailbox, which may need to remain "static". It would be good if at least an admin (but preferably self serve by a user), could clean up calendars after an organizer is gone. - James260Nov 08, 2022Copper Contributor
Likely very late to this part, but here is what you may want to look into. After completing your content search, ...
New-ComplianceSearchAction -SearchName "YourSearchName" -Purge -PurgeType HardDelete
SoftDelete is also an option.
Be careful that your content search has only returned items you want to delete.
- b-lowOct 17, 2022Copper ContributorA problem I ran into with a previous poster's meeting delete script is for a recently departed HR employee, specifically a recruiter. It send out a bazillion cancel requests to both internal and external contacts for all past and future meetings. We even had a few people who had interviewed with the company send follow-up emails asking what's up.
Has anyone made a script that looks at a departed employee's past and future meetings, looks at the attendees for those meetings, and uses the attendee list to go into the attendees' calendars and deletes all past, or more importantly, all future meetings for internal employees, and does nothing for external attendees? - SCROWLEY70Oct 17, 2022Copper Contributor
it sent out meeting cancelation notices to end usersb-low
- Adrian del CastilloDec 15, 2021Copper Contributor
I know this is an old thread, but I came across this issue and I was able to run this command in powershell and it basically deleted the calendar event that the terminated user sent out
Get-Mailbox |Search-Mailbox -SearchQuery "kind:meetings AND From:Email address removed" -Deletecontent
- EFFFFFSep 07, 2021Copper Contributorcan this be done under the GUI? not familiar with the Security & Compliance Center
- yetidogJan 08, 2021Copper Contributor
Creating a compliance search for any messages of kind:meetings from the terminated user and running the following command worked for me:
New-ComplianceSearchAction -SearchName "SEARCH TO DELETE" -Purge -PurgeType SoftDelete
Full instructions here: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization