Get todays appointments from outlook with powershell: Unwanted results

Question:

I’m extracting todays appointments with the following code:

All todays appointments are listed but also a lot of recurring appointments that are NOT taking place today (birthdays, weekly appointments, …). Any idea how to avoid that?

EDIT: Seems like all this unwanted appointments are originally from my mobile synced to outlook. I’ll try the script on a ‘clean’ PC.

EDIT: I tried the script on another PC without synced elements and it’s the same: All recurring elements are display whether they are today or not.
AND [IsRecurring] = ‘$False’
is not helping either.

Answer:

The initial query must include the original appointment of the series, so if the series started 3 months ago, the collection of appointments ($folder.items) date range must be set accordingly.

Afterwards you can filter for the desired date range.

This code works:

To run this -for dummies, like myself yesterday 🙂

Source:

Get todays appointments from outlook with powershell: Unwanted results by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply