How Can I Remove Calendar Events from a User Whose Account Has Been Deleted for Over 90 Days

Maranya, Damon 326 Reputation points
2024-01-26T21:01:31.04+00:00

We have a user that created a couple of calendar events that include all members of the leadership team. That employee has now left the company and just a bit over three months later they leadership team no longer needs the meetings. But none of them are an owner so they can't cancel or edit it. At this point the employee's user account has been gone for longer than the retrieval period, so removing the event with

get-calendarevents | remove-calendarevents

just returns an unknown mailbox error. The results of get-mailbox are the same. I can find the events using the Compliance search through Purview. But I can't find a way to delete them through the compliance search and I can't find a cmdlet that recognizes any attribute of the events. Does anyone have any ideas on how we might accomplish this?

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,771 questions
Microsoft Exchange Online
0 comments No comments
{count} votes

Accepted answer
  1. Kael Yao-MSFT 37,711 Reputation points Microsoft External Staff
    2024-01-29T02:30:15.27+00:00

    Hi @Maranya, Damon

    Kindly note that the normal method to remove a meeting from attendees' calendars is to have the organizer cancel the meeting by sending a cancellation email.

    In this case since the mailbox was deleted and not possible to restore, we may need to use Content Search or Search-Mailbox cmdlet to get and remove this event from all attendees' mailboxes.

    Let's take Search-Mailbox for example.

    Running the below cmdlet in Exchange Online Powershell will search all mailboxes for a meeting with subject "meeting to remove" and copy the search results (emails or calendar events) to a folder named "meeting_search" in admin's mailbox:

    Get-Mailbox | Search-Mailbox -SearchQuery "(Subject:'meeting to remove') AND (Kind:meetings)" -TargetMailbox "admin" -TargetFolder "meeting_search" -LogLevel Full
    
    

    Once you confirmed these are the emails or events to be removed, you can run this cmdlet to remove these from the attendees' mailboxes:

    Get-Mailbox | Search-Mailbox -SearchQuery "(Subject:'meeting to remove') AND (Kind:meetings)" -DeleteContent -Confirm:$false
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. JOHN TREANOR 0 Reputation points
    2025-03-19T17:15:28.14+00:00

    Thank you. I've been trying to do this but the command just hangs and nothing gets done, no output. Any ideas?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.