Friday, June 10, 2016

Deleted Exchange Calendar item keeps coming back

Scenario:
Exchange Calendar appointments/or recurring meetings keep returning back in few hours after you deleted it from Outlook or OWA (assume that meeting organizer is no longer with a company). Additionally you may notice that turning off Calendar Repair Assistant (CRA) on affected Exchange mailbox fixes problem temporarily until you turn it on again.

Set-Mailbox stan@domain.com -CalendarRepairDisabled $true

The Calendar Repair Assistant performs the following functions:
  • Detects inconsistencies
  • Determines if inconsistencies were intentional
  • Corrects inconsistencies 
  • Sends a calendar repair update message if a correction was made
Affected platforms: Exchange Server 2010, 2013, 2016, Exchange Online

Solution:
You must be assigned with Discovery Management role and Mailbox Import Export  role permission to complete this task.

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'from:"stan@domain.com" AND kind:meetings AND SUBJECT:"Engineering and Operations Team Meeting"' -DeleteContent -Force

PowerShell script will basically remove all similar meeting items that CRA may want to "align and fix" again. It will search every mailbox in organization for Calendar meeting items from "stan@domain.com" with specific subject "Engineering and Operations Team Meeting" and delete those items from the mailbox. You may specify additional SearchQuery parameters to reduce search to your specific scope and to have more precised results.

Just for case if you are looking for another content removal:

–SearchQuery kind:contacts
–SearchQuery kind:notes
–SearchQuery kind:tasks
–SearchQuery kind:im
–SearchQuery kind:email

References: