D
D
Dmitry Shumov2019-07-22 11:43:34
PowerShell
Dmitry Shumov, 2019-07-22 11:43:34

Powershell + Exchange, how to delete appointments for a certain period?

Good afternoon!
There is a problem:
It is necessary to delete old appointments for a certain period from the Outlook calendar. Meetings can be recurring.
Created test meetings. Run the script:

Search-Mailbox -identity ivan.pupkin -SearchQuery 'Received: 07/20/2019..07/21/2019 kind: meetings' -DeleteContent

As a result, all meetings were deleted. Both for the period and planned.
Question: why? and what's wrong? What did I miss in the script? Maybe recurring meetings do not need to be deleted?
PS Actually, the task is wider, I just decided (as it seemed to me) to go the easy way. The task itself:
Users have a lot of old appointments in their calendars that have attachments. Investments are sometimes quite large. Due to these investments, the volume of the calendar increases to a gigantic size (20-30 Gb.). This entails a long opening of the calendar and freezes when opening.
Among these meetings, there are also recurring meetings. When you try to archive old meetings, regular and recurring ones disappear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akelsey, 2019-07-22
@dshumov

Both for the period and planned.

You yourself indicated that to delete everything that is received between, and the type.
Those. an event scheduled for the new year but received on July 20 will also be deleted.
It is unlikely that your task is solved by a cmdlet in EMS, you need to write a full-fledged script through EWS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question