Scheduling and managing events using Outlook.com calendar
To stop spam calendar events from being added to your calendar, you can adjust your calendar settings to prevent unwanted invitations. In Outlook, you can set your calendar to only accept invitations from people in your organization or to require approval for all invitations. This can help reduce the number of spam events.
To delete existing spam events from your calendar, you can manually remove them by selecting the events and choosing the delete option. If there are many spam events, you might consider using a script or a command in PowerShell, such as the Remove-CalendarEvents cmdlet, which allows you to cancel future meetings in user or resource mailboxes. This cmdlet can also help you remove multiple events at once if you specify the correct parameters.
For example, you can use the following command to remove events:
Remove-CalendarEvents -Identity "[email protected]" -CancelOrganizedMeetings -QueryWindowInDays 30
This command will cancel all meetings organized by you within the next 30 days.
Make sure you have the necessary permissions to run the cmdlet and that your mailbox is enabled to send mail, as meeting cancellations must be sent out to attendees.
References: