1

我尝试获取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...

这很好,但是当我尝试获取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-Objectcmdlet 获得正确的输出吗?有什么区别?

4

0 回答 0