Forum Discussion
How to delete all calendar appointments booked by terminated users?
Thanks Vasil.
If the user account DOES NOT exists ( i.e. If the On premsise AD account is in disabled state and o365 mailbox is in softdeleted state) then How to find all inactive users that have booked meetings and how to cancel the meetings and then send email notifications to the attendees.
Any scrip will be very usefull for me
Thanks
Sounder
If the user doesnt exist, you will only be able to delete them (not cancel). There's an example script here: https://social.msdn.microsoft.com/Forums/en-US/c94b2f4b-a3a0-4006-973d-b150fae078ca/using-ews-to-cancel-a-meeting-in-a-room-mailbox?forum=exchangesvrdevelopment#bc8ad055-d79e-4aae-aeb2-61d835d200d6
Just change the method to Delete on the last line...
- Willem VerwijsNov 15, 2018Copper Contributor
It has been 1 year since this last post and the article refers to exch 2010, niet O365. Any new tips or methods on how to achieve this?
- Kerry LoftusNov 21, 2018Copper Contributor
I just spent two days working with Microsoft on this, user has been deleted due to being disabled and placed in an OU that doesn't sync. Here is the command line:
Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Kind:Meetings AND Organizer:EmailAddressOfExEmployee' -DeleteContent –Force
- EFFFFFAug 25, 2022Copper Contributor
could you use the -whatif first?
- VasilMichevNov 15, 2018MVP
The answer is still the same. You can only Cancel meetings if the organizer's account still exists. Otherwise, best you can do is delete them.