Remove one meeting in a re-occurring series, using PowerShell

Sikhumbuzo Ntsada 0 Reputation points
2023-05-29T14:28:19.95+00:00

Disclaimer:

The question was asked else where!

The requirement is to cancel 1 meeting in a re-occurring series and the subject of my meeting is "Bad meeting 2" Meeting happens every Wednesday of the week 14:00 – 15:00 PM as an example. I want to cancel the meeting for 17 May 2023 only.

These are some of the available properties relating to the meeting, and I am hoping someone can point me in the right direction or command to use to delete the specific meeting in the series.

Get-CalendarViewDiagnostics -Identity "user@example.com" -WindowStartUtc 05/16/2023 -WindowEndUtc 05/18/2023
Id                    : AAMkADY3MzRkYTJiLTc0MGUtNDExYy1hODcyLTZjNzcxMTU4ZmJhNgFRAAgI21Wgff5AAEYAAAAACLVnEv3c9UikP+R5rz5VWAcAGh4ncX8HSkGpDhOLaNxhEAAAq8g3gQAAGh4ncX8HSkGpDhOLaNxhEAACmHsL6QAAEA==
ChangeKey             : Gh4ncX8HSkGpDhOLaNxhEAACl60nuw==
SeriesId              : 040000008200E00074C5B7101A82E00800000000AAE5FCF9EF88D901000000000000000010000000885F749FF5B30C408C4C5A35FBF5EFB6
GlobalObjectId        : 040000008200E00074C5B7101A82E00807E70510AAE5FCF9EF88D901000000000000000010000000885F749FF5B30C408C4C5A35FBF5EFB6
SeriesMasterId        : AAMkADY3MzRkYTJiLTc0MGUtNDExYy1hODcyLTZjNzcxMTU4ZmJhNgBGAAAAAAAItWcS/dz1SKQ/5HmvPlVYBwAaHidxfwdKQakOE4to3GEQAACryDeBAAAaHidxfwdKQakOE4to3GEQAAKYewvpAAA=
Get-CalendarDiagnosticObjects -Identity "user@example.com" -Subject "Bad meeting 2" -StartDate 05/16/2023 -EndDate 05/18/2023 #| Select-Object (the result was cleaned)
ItemId                       : FhoeJ3F/B0pBqQ4Ti2jcYRAAApetJ3VGAAAAAAi1ZxL93PVIpD/kea8+VVgHABoeJ3F/B0pBqQ4Ti2jcYRAAAKvIN4YAABoeJ3F/B0pBqQ4Ti2jcYRAAAph69GcAAA8=
LastModifiedTime             : 05/17/2023 18:47:10
NormalizedSubject            : Bad meeting 2
StartTime                    : 05/16/2023 19:00:00
SubjectProperty              : Bad meeting 2
OriginalLastModifiedTime     : 05/17/2023 18:47:10
CalendarLogRequestId         : 1ed789f3-fd68-337a-df0d-7b6a7e196d0e
GlobalObjectId               : 040000008200E00074C5B7101A82E00800000000AAE5FCF9EF88D901000000000000000010000000885F749FF5B30C408C4C5A35FBF5EFB6

The idea is to cancel a specific meeting in the series using the ItemId, or any other possible property that can be used above. I identified the meeting in this case using the unique ItemId corresponding to today's date.

Remove-CalendarEvents -Identity "user@example.com" -CancelOrganizedMeetings -ItemIDs "FhoeJ3F/B0pBqQ4Ti2jcYRAAApetJ3VGAAAAAAi1ZxL93PVIpD/kea8+VVgHABoeJ3F/B0pBqQ4Ti2jcYRAAAKvIN4YAABoeJ3F/B0pBqQ4Ti2jcYRAAAph69GcAAA8="  -QueryWindowInDays 1 

Remove-CalendarEvents: A parameter cannot be found that matches parameter name 'ItemIDs'.

This one cancels the entire series.

Remove-CalendarEvents -Identity "user@example.com" -CancelOrganizedMeetings -QueryStartDate "05/17/2023" -QueryWindowInDays 1

I need ideas how to use the available properties on the meeting to delete the One meeting. I tried piping Remove-CalendarEvents, but it is not allowed.

Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,985 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,289 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 144.8K Reputation points MVP
    2023-05-29T15:52:25.85+00:00

    Its deprecated by still around in Exchange Online ( and also avail on-prem)

        Search-Mailbox -Identity <mailbox> -SearchQuery ‘Subject:"Meeting to remove"' -DeleteContent
    
    		
    
    0 comments No comments

  2. Aholic Liang-MSFT 13,826 Reputation points Microsoft Vendor
    2023-05-30T09:52:27.4533333+00:00

    Hi @ Sikhumbuzo Ntsada ,

    According to my tests, the relevant parameters obtained using the following command (e.g. itemid, lastmodifiedtime) are relevant properties of the entire series of meetings, not specific event.

    Get-CalendarDiagnosticObjects -Identity "user@example.com" -Subject "Bad meeting 2" -StartDate 05/16/2023 -EndDate 05/18/2023
    

     

    Then I tried searching for the event using the commands New-ComplianceSearch and search-mailbox, but the result was that it was all meeting emails, and deleting it would delete all events in the series.

    The same is true for the results of using the content search feature in Microsoft purview.

     

    Therefore, as a workaround, I recommend that you go into the meeting organizer's mailbox and cancel the event for the specified date in this series from the calendar.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.