title: Outlook Items.Restrict Does not return all messages
body: <p>I have a small powershell script, which uses Outlook interop to move certain messages from inbox to other folders. The basic move operation is done using the code below:</p>
  
  <pre><code>[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Outlook") | Out-Null
  $olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type] 
  $outlook = new-object -comobject outlook.application
  $namespace = $outlook.GetNameSpace("MAPI")
  $inbox = $namespace.getDefaultFolder($olFolders::olFolderInbox)
  $filter = "[SenderName] = 'Dummy Sender'"
  $messages = $inbox.items.Restrict($filter)
  $messages | % { 
      Write-Host "`t$($_.Subject)" 
      [void]$_.Move($destination) | Out-Null
  }
  </code></pre>
  
  <p>The problem I'm noticing is that <code>items.Restrict</code> is not returning all matching messages. Each time I run the script, I get anywhere from 3 to 20 messages. </p>
  
  <p>Has anyone observed this behavior before? Is there something obvious that I'm missing?</p>