Remove-CalendarEvents.ps1
This script deletes calendar items in Microsoft Outlook based on the subject.
You may need to use this script if you have Outlook performance issues. This kind of problem occurs on macOS when the calendar has more than 5000 items/events. The script uses the Outlook COM object to interact with the user's Outlook application. It loops through each item in the user's calendar and deletes the ones whose subject matches the specified string.
-
What is it ? A script not a Cmdlet script.
-
Who is it for ? Regular User.
-
Why to use it ? Fix Outlook perf.
-
When to use it ? When you know the events you have to delete and do not have access to Exchange server or a Windows device.
- Microsoft PowerShell
- Microsoft Outlook
Regarding Microsoft PowerShell, go to the pages for :
- Windows https://learn.microsoft.com/en-gb/powershell/scripting/install/installing-powershell-on-windows
- MacOS https://learn.microsoft.com/en-gb/powershell/scripting/install/installing-powershell-on-windows
- Linux https://learn.microsoft.com/en-gb/powershell/scripting/install/installing-powershell-on-linux
Regarding Microsoft Outlook go to the pages :
- Individual subscirption https://account.microsoft.com/services/microsoft365
- Enterprise subscription https://portal.office.com/account
- Download Remove-CalendarEvents.ps1 and save on your computer.
- Start PowerShell and go to the folder where you saved the file.
- Set the PowerShell execution policies for Windows computers to Unrestricted
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
- If you want to cancel the meeting calendar named,
My Meeting
, run the following command.\Remove-CalendarEvents.ps1 -SubjectToDelete "My Meeting"
Windows | Linux | MacOS |
---|---|---|
In progress | To be decided | To be decided |
- Windows
- Script
- Cmdlet
Distributed under the Unlicense license. See the file, LICENCE
for more information.
If you have any feedback, please post on the Issues section.
Feel free to contribute to its improve. See file, CODE_OF_CONDUCT
for more information.