title: Get todays appointments from outlook with powershell: Unwanted results
body: <p>I'm extracting todays appointments with the following code:</p>
  
  <pre><code>$olFolderCalendar = 9
  $ol = New-Object -ComObject Outlook.Application
  $ns = $ol.GetNamespace('MAPI')
  $Start = (Get-Date).AddDays(-1).ToShortDateString() + " 00:00"
  $End = (Get-Date).AddDays(+1).ToShortDateString() + " 00:00"
  
  $Filter = "[MessageClass]='IPM.Appointment' AND [Start] &gt; '$Start' AND [End] &lt; '$End'"
  
  $Appointments = $ns.GetDefaultFolder($olFolderCalendar).Items
  $Appointments.Sort("[Start]")
  $Appointments.IncludeRecurrences = $false
  
  foreach ($Appointment in $Appointments.Restrict($Filter) ) {
      ...
  }
  </code></pre>
  
  <p>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?</p>
  
  <p>EDIT: Seems like all this unwanted appointments are originally from my mobile synced to outlook. I'll try the script on a 'clean' PC.</p>
  
  <p>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.</p>