Forum Discussion

muhamedrafeeq's avatar
muhamedrafeeq
Copper Contributor
Jul 13, 2020

Delete all calendar appointments for a list of users using powershell

Hi,

 

Because of scheduling remote learning classes, the teachers has got numerous calendar events in their Teams calendar and its crashing the Teams app. Can somebody please help me with a powershell script to clear the calendar events for a list of users using input file (csv or txt).

 

TonyRedmond 

 

Regards,

Muhamed

8 Replies

    • muhamedrafeeq's avatar
      muhamedrafeeq
      Copper Contributor

      Hi Ardamilola ,

       

      Yes I tried the Remove-CalendarEvents script, but I believe that script is for future meetings and I want to clear the past meeting entries too. Also I got to clear calendar events for around 1000+ users. So a script which calls the input list would be feasible.

      • victor_fernande's avatar
        victor_fernande
        Copper Contributor

        Hi muhamedrafeeq and Ardamilola

         

        Did you solve this problem? 

        I'm facing the exactly problem here. 

         

        I tried 

        Remove-CalendarEvents -Identity user@domain.com.br -CancelOrganizedMeetings -Confirm:$false -verbose

         

        and


        Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery "kind:meetings AND From:user@domain.com.br" -DeleteContent

         

        But no success 😞

    • muhamedrafeeq's avatar
      muhamedrafeeq
      Copper Contributor

      Hi guys,

       

      I really need to remove the calendar events for many staffs (o365 mailbox). Can somebody share a powershell script to do the same ?

       

      Regards,

      Rafeeq

Resources