小编Ref*_*Ref的帖子

从管道中的上一个 Cmdlet 获取值

我得到以下命令: Get-Mailbox | Get-MailboxPermission | Select-Object Identity,User,AccessRights | Format-Table -AutoSize. 我希望能够PrimarySMTPAddress从我获得Get-Mailbox. 在我添加属性的那一刻,我PrimarySMTPAddress在列中什么也没有收到。

最终结果应该是这样的:

Identity                       User     AccessRights     PrimarySMTPAddress
--------                       ------   ------------     ------------------
Domain.local/Users/Mailbox1    User1    {FullAccess}     Mailbox1@Domain.local
Domain.local/Users/Mailbox2    User2    {FullAccess}     Mailbox2@Domain.local
Domain.local/Users/Mailbox3    User3    {FullAccess}     Mailbox3@Domain.local
Run Code Online (Sandbox Code Playgroud)

powershell pipeline

3
推荐指数
1
解决办法
3785
查看次数

标签 统计

pipeline ×1

powershell ×1