title: Reading mail data from powershell
body: <p>I'm trying to read some data from a .pst file using powershell and I can't seem to extract some attributes for mail items, specifically: </p>
  
  <p>recipients, sender, cc, bcc, body</p>
  
  <p>for some reason when I try to access these properties from code it shows up as blank. Most of the other properties show up file (subject, attachments etc...)</p>
  
  <p>I'm using the following code:</p>
  
  <pre><code>$objOutlook = new-object -ComObject Outlook.Application
  
  $ns = $objOutlook.GetNamespace("MAPI")
  
  $ns.AddStore($pst.FullName)
  
  $folders = $ns.Folders
  
  $archiveStore = $ns.Folders[$pst.Name.Replace(".pst","")]
  </code></pre>
  
  <p>from there I just use Folders and Items recursively to get my mail items. </p>
  
  <p>Any ideas?</p>