powershellcalendarexchange-server-2007

Programmatically delete canceled exchange calendar events - Powershell?


We have a several autobooking conference rooms. Each of the rooms calendars are getting terribly cluttered. Pretty much from the beginning of time until now, all of our canceled conference room events are still on the calendars.

Is there a way to programmatically delete all canceled meetings in a calendar. This includes individual meetings, canceled series', or canceled recurrences in a series. Possible with Exchange Management Shell?

EDIT: I apologize. I forgot to mention that I am using Exchange 2007.


Before it is mentioned. We are switching over to autoprocessed rooms, but our old conference room calendars are cluttered to the max, and we want to clean them of the canceled meetings before we make this switch.


Solution

  • Since you're using Exchange 2007, you have the option of using the Exchange Web Services Managed API for this. Glen Scales has some excellent examples on his blog.

    http://gsexdev.blogspot.com/search?q=calendar+delete+items

    You can download the API from here:

    http://www.microsoft.com/en-us/download/details.aspx?id=35371