title: Powershell select-object empty
body: <p>I try to get <code>FolderPath</code> for Exchange Mailboxes like this:</p>
  
  <pre><code>get-mailbox | select Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
  </code></pre>
  
  <p>This gives me the following output:</p>
  
  <pre><code>Name       FoldePath
  ----       ---------
  User01     {/Top of Information Store, /Calendar, /Contacts, /Delet...
  User02     {/Top of Information Store, /Calendar, /Contacts, /Delet...
  </code></pre>
  
  <p>That's good, but when I try to get <code>FolderPath</code> for a single mailbox, it returns empty output.</p>
  
  <pre><code>get-mailbox User01 | select Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
  </code></pre>
  
  
  
  <pre><code>Name        FoldePath
  ----        ---------
  User01
  </code></pre>
  
  <p>Format-Table returns correct output:</p>
  
  <pre><code>get-mailbox User01 | ft Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
  </code></pre>
  
  
  
  <pre><code>Name    FoldePath
  ----    ---------
  User01  {/Top of Information Store, /Calendar, /Contacts, /Delet...
  </code></pre>
  
  <p>Can I get correct output with <code>Select-Object</code> cmdlet? What is the difference?</p>