Disabling sign-in and reclaiming a license may feel like the end of a Microsoft 365 offboarding. But if the departing user organized recurring meetings, their calendar can leave a long tail behind:
Obsolete meetings on coworkers’ calendars and rooms or equipment remain reserved.
Microsoft specifically tells administrators to cancel a former employee’s meetings and warns that booked rooms and equipment remain unavailable until those meetings are canceled. More importantly, Microsoft’s documentation for `Remove-CalendarEvents` states that the mailbox must still be enabled to send mail, because Exchange has to send the cancellation messages.
That makes calendar cleanup an order-of-operations issue: cancel the organized meetings before removing the Exchange Online license, deleting the account, or taking any other action that prevents the mailbox from sending.
The Exchange Online PowerShell commands
The following PowerShell sequence connects to Exchange Online, previews the affected meetings, and then cancels the departing user’s organized meetings while the mailbox can still send cancellation notices.
If the Exchange Online module is not already installed, install it once:
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser You can preview the affected meetings without cancelling anything:
$OrganizerUPN = "departing.user@contoso.com"
Connect-ExchangeOnline -UserPrincipalName $AdminUPN
Remove-CalendarEvents `
-Identity $OrganizerUPN `
-CancelOrganizedMeetings `
-QueryWindowInDays 1825 `
-PreviewOnly `
-Verbose
Disconnect-ExchangeOnline -Confirm:$false After reviewing the preview, run the actual cleanup:
Import-Module ExchangeOnlineManagement
$AdminUPN = "admin@contoso.com"
$OrganizerUPN = "departing.user@contoso.com"
Connect-ExchangeOnline -UserPrincipalName $AdminUPN
try {
Remove-CalendarEvents `
-Identity $OrganizerUPN `
-CancelOrganizedMeetings `
-QueryWindowInDays 1825 `
-Confirm:$false
}
finally {
Disconnect-ExchangeOnline -Confirm:$false
} This is not just a calendar-item deletion. The command triggers meeting cancellation notices from the organizer’s mailbox, allowing Exchange to remove the canceled meetings from attendee and resource calendars.
The 1,825-day value is Microsoft’s maximum five-year query window. If any occurrence of a recurring meeting falls inside that window, Exchange cancels the entire series – not only the occurrences within the window.
The cmdlet targets meetings organized by the mailbox that have attendees or resources; it does not cancel personal appointments or meetings without attendees or resources. Your administrator also needs the appropriate Exchange role-based permissions.
> Important: -PreviewOnly never sends cancellations. Remove that switch, as shown in the second script, to perform the cleanup.
See Microsoft’s official documentation for `Remove-CalendarEvents`
Put the sequence on autopilot with EasyEntra
Calendar cleanup is only one part of a safe departure. EasyEntra’s automated Microsoft 365 offboarding includes this step, along with customizable identity, access, licensing, mailbox, delegation, forwarding, automatic-reply, and cleanup actions.
EasyEntra orchestrates them in the correct order for both hybrid Active Directory and cloud-only environments – so cancellation notices go out while the mailbox can still send, and the rest of the offboarding follows your chosen policy.
Download the 30-day EasyEntra trial and turn a fragile checklist into one consistent offboarding workflow.
Book an online demo to see the primary features and have your questions answered by our specialists.