[英]Exchange Management Shell strip output
Exchange 2010, I am using the following in the exchange management shell $mailidentities = Get-Mailbox | Get-MailboxPermission | where {$_.identity.tostring() -like "* STAFF/*" -and $_.identity.tostring() -NotLike "*Ex_Staff*" -and $_.User.tostring() -like "*SELF*" -and $_.IsInherited -eq $false} | Select-object Identity foreach ($mailidentity in $mailidentities) { Write-Host "$mailidentity" }
Exchange 2010,我在交换管理外壳程序$mailidentities = Get-Mailbox | Get-MailboxPermission | where {$_.identity.tostring() -like "* STAFF/*" -and $_.identity.tostring() -NotLike "*Ex_Staff*" -and $_.User.tostring() -like "*SELF*" -and $_.IsInherited -eq $false} | Select-object Identity foreach ($mailidentity in $mailidentities) { Write-Host "$mailidentity" }
使用以下内容$mailidentities = Get-Mailbox | Get-MailboxPermission | where {$_.identity.tostring() -like "* STAFF/*" -and $_.identity.tostring() -NotLike "*Ex_Staff*" -and $_.User.tostring() -like "*SELF*" -and $_.IsInherited -eq $false} | Select-object Identity foreach ($mailidentity in $mailidentities) { Write-Host "$mailidentity" }
$mailidentities = Get-Mailbox | Get-MailboxPermission | where {$_.identity.tostring() -like "* STAFF/*" -and $_.identity.tostring() -NotLike "*Ex_Staff*" -and $_.User.tostring() -like "*SELF*" -and $_.IsInherited -eq $false} | Select-object Identity foreach ($mailidentity in $mailidentities) { Write-Host "$mailidentity" }
The results are returned @{Identity=domain/Group/UserName}
What is the correct syntax to get back only domain/Group/UserName
? 返回结果@{Identity=domain/Group/UserName}
什么是仅取回domain/Group/UserName
的正确语法? The final outcome is to assign fullaccess permission to a supervisory mailbox to each user. 最终结果是向每个用户分配对监视邮箱的完全访问权限。
Add the -ExpandProperty option to the Select cmdlet. 将-ExpandProperty选项添加到Select cmdlet。 Select-obejct -ExpandProperty Identity
. Select-obejct -ExpandProperty Identity
。 The shortcut -exp can be used also. 也可以使用快捷方式-exp。 For syntax of Select or Select-Object cmdlet see http://www.colorconsole.de/PS_Windows/en/Select-Object.htm or https://ss64.com/ps/select-object.html 有关Select或Select-Object cmdlet的语法,请参见http://www.colorconsole.de/PS_Windows/en/Select-Object.htm或https://ss64.com/ps/select-object.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.