I'm currently working on improving my off-boarding script for users who are leaving the company. I've added a command that removes calendar events created by the departed staff member. However, I'm curious if there's a way to automatically decline any meetings they accepted, so others are informed that they won't be attending anymore. Additionally, are there other important aspects I should consider regarding calendar cleanup for employees who have left?
5 Answers
Running this script automatically might not be the best idea, as some meetings could still be relevant. An auto-decline feature for meetings they were invited to is useful, but I suggest sending a list of the scheduled events to their supervisor first. They can then decide whether to reschedule or delete those invites after confirming what's necessary.
You should definitely check what the command actually does—and more importantly, what it doesn't do. I had a tough time a few years back when I thought it would handle everything, but I ended up using MS Purview for calendar events instead. Not the best experience!
From what I've gathered, it cancels events created by the user who has left and informs those invited. Am I missing something? We don’t have Purview, so ideally, looking for a PowerShell solution.
Where can I find your script? I’d love to check it out!
If you're converting the user's calendar to a shared mailbox, you could use Set-CalendarProcessing to automatically decline any new invites. But just a heads up, it won't reject any pending invites that are already out there.
Hey, can you share your off-boarding script? It would be great to see your approach, as you’re asking for help without showing any code. It could help others in a similar situation.

We've added this step to our offboarding process too. We generate a report on the calendar events owned by the departing user, which we then share with their manager. This way, they can sort out essential meetings, which is super helpful for sales and customer success roles.