Forum Discussion
Philipp_Lutz
Dec 21, 2023Copper Contributor
Delete a specific calendar event
Hi,
i want to delete a specific calendar event using PowerShell.
Since the "Search-Mailbox" Cmdlet is outdated and the "Remove-Calendar" Cmdlet is only showing or deleting events in a period of time, i don't know how i am able to delete one specific calendar item.
For example:
Someone organized meetings on friday where one is called "Test123" and if i put the command in:
Remove-CalendarEvents -Identity "email address removed for privacy reasons" -CancelOrganizedMeetings -QueryStartDate 21.12.2023 -QueryWindowInDays 3 -PreviewOnly -Verbose
I even get the SubjectProperty with "Test123" and the other meetings, now i want to delete just the "Test123".
Is it possible somehow?
Thanks in advance!
5 Replies
Sort By
- You cannot, the cmdlet simply isn't designed to target individual entries. As for Search-Mailbox, it continues to work just fine, however with it you can only delete the event, not cancel it.
- Philipp_LutzCopper Contributor
VasilMichev, i can't find the Search-Mailbox cmdlet in the Exchange-Online Module. I installed the latest version of that module but it still couldn't find it. What i can find is the "Search-MailboxAuditLog" cmdlet, is this the correct one? I can find the "Test123" Event. Now how can i delete that?
- Make sure you have the required permissions, Search-Mailbox is only available to users with the following roles assigned:
Mailbox Import Export
Mailbox Search