Articles in the "Meeting cancellation script" series
- Cancel future meetings in a mailbox
- Meeting cancellation script updated [This article]
- Meeting cancellation script updated for large result sets
I have updated the Cancel-MailboxMeetings.ps1 script. These are the changes:
- Changed the date parameters to align with Microsoft’s Remove-CalendarEvents cmdlet. StartDate is now QueryStartDate and EndDate is now QueryWindowInDays. The default time frame is still one year from the query start date, but is now specified as an integer of days instead of a specific date.
- Added a preview mode via the PreviewOnly switch parameter (also to align with Microsoft). Using the parameter will list which meetings (by subject and start date, first occurrence start date if a recurring meeting) would be affected. To provide enough detail, it will indicate if it is a standalone meeting or series and whether the meeting is being canceled (because the mailbox is the organizer) or declined (because the mailbox is an attendee). If you use the EndOrganizedRecurringMeetings parameter, it will also use wording to show that a meeting series’ end date would be updated instead of canceled.
- Added detection of modified occurrences that will be lost if a recurring series’ end date is changed. Because exceptions to a meeting (only modifications, not deletions) are removed when a series’ end date is changed, the script checks for modified occurrences that occurred in the past of the query start date and prompts you to confirm that you want to update that meeting.
- Added a switch parameter named SuppressLostExceptionPrompt. Use this if you want to prevent the confirmation prompt about lost modified occurrences and have it change the end date anyway. This parameter only has an effect if also used with EndOrganizedRecurringMeetings.
- Although added only while I was testing, but decided to leave in, are some extra details written to the screen if you use the Verbose parameter.
The code in the first post has been updated, as has the downloadable version:
Cancel-MailboxMeetings.ps1 (12.5 KiB)