FolderPath
次のような Exchange メールボックスを取得しようとしています。
get-mailbox | select Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
これにより、次の出力が得られます。
Name FoldePath
---- ---------
User01 {/Top of Information Store, /Calendar, /Contacts, /Delet...
User02 {/Top of Information Store, /Calendar, /Contacts, /Delet...
それは良いことですが、1 つのメールボックスを取得しようとするとFolderPath
、空の出力が返されます。
get-mailbox User01 | select Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
Name FoldePath
---- ---------
User01
Format-Table は正しい出力を返します。
get-mailbox User01 | ft Name,@{L="FoldePath";E={(Get-MailboxFolderStatistics $_.Name).folderpath}}
Name FoldePath
---- ---------
User01 {/Top of Information Store, /Calendar, /Contacts, /Delet...
Select-Object
コマンドレットで正しい出力を取得できますか? 違いはなんですか?