EASYENTRA Blog

News & Updates

Clear the Organizer’s Calendar Before Microsoft 365 Offboarding

Remove recurring calendar events before offboarding the mailbox

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.

Free 30-minute demo

try 30 days for free

GET EASYENTRA NEWS

Opt out at any time

“One of the best products I've used.”
Gary Shurland
Chief Information Officer, Mirick, United States
“This tool has been invaluable in streamlining our IT processes.”
Tyson Mckay
Chief Information Officer, Southwest Network, United States
“This product has been a miracle for our Help Desk. EasyEntra has completely transformed how we handle Microsoft 365 administration.”
Doug Sanders
Manager of Technical Customer Support, Junior Achievement USA, United States
“Your product is such a time saver. I love it!”
Scott Fehr
IT Infrastructure, MEC Aerial Work Platforms, United States
“It's a good product and saves us lots of time for these ongoing quick admin tasks.” 
Chris McFerran
Managing Director, CTech IT Solutions Ltd, United Kingdom
“EasyEntra has significantly streamlined our workflow, simplifying everything. It feels almost like a revolution.”
Johan Sadelius
IT-chef, Arjeplog Kommun, Sweden
I greatly appreciate your assistance and willingness to enhance the already outstanding product.”
Michael I. Wilson
Executive Director of Information Technology, Archdiocese Of Washington, United States
“It's great not having to switch back and forth between the O365 admin center and the Teams admin center to assign groups. I am sold!”
Thomas Madden
Director Information Technology, AutoPayPlus, United States
“I would highly recommend organizations use the solution as it greatly simplifies various tasks.”
S. Roger Singh
Chief Technology Officer, Prasad & Company LLP, Canada
“EasyEntra is time-saving. Love the copy/paste for user/computer groups and the copy to new user.”
Damian Nita
Associate Network Administrator, Shenandoah Valley Westminster-Canterbury, United States
“EasyEntra has transformed our daily IT operations by simplifying user management, reducing errors, and enhancing overall efficiency.”
Henrik Nefling
IT- and Digitalization Manager, Animal Protection Denmark, Denmark