Forum Discussion

tyagia2ul's avatar
tyagia2ul
Copper Contributor
Feb 07, 2023

How to remove meeting invite sent by user who left the organization

We have a user who left the company back in December 22 and there are couple of re occuring meeting which i want to delete . I tried "search - mailbox - search query "  but it's not working if anyone can help me the script to delete the meeting invites .

 

Amy help would be highly appreciated.

 

Thanks,

Atul 

  • AndySvints's avatar
    AndySvints
    Steel Contributor

    Hello tyagia2ul,

    If mailbox still exist on your tenant you can use Remove-CalendarEvents cmdlet.

    Code will be something similar to this:

    #First check which meetings you will be removing using -PreviewOnly parameter
    Remove-CalendarEvents -Identity "<User>" -CancelOrganizedMeetings -QueryWindowInDays 120 -PreviewOnly -Verbose
    
    #Remove all meetings that occurs on or 120 days after today's date
    Remove-CalendarEvents -Identity "<User>" -CancelOrganizedMeetings -QueryWindowInDays 120 -PreviewOnly -Verbose

    Please note you will need to have access to that mailbox to run it. 

    Hope that helps.

     

Resources