get-mailbox的protocolSettings属性可以返回多个值,具体取决于启用或禁用的内容。默认情况下,创建新用户时,在启用或禁用这些属性之前,这些属性都不存在。
我想使用-filter从Get-Mailbox返回所有protocolSettings,以通过不管道到Where或Select来优化命令。这应该减少在使用管道之前返回的记录数量。
Piping Select会给我输出,但同样,我想避开管道并使用-filter:
Get-Mailbox | select ProtocolSettings
{MAPI§1§§§§1§§§, HTTP§0§1§§§§§§, OWA§0, RemotePowerShell§1}
有没有办法使用-filter返回我在Select管道中的内容?
我试过了:
Get-Mailbox -Filter {(ProtocolSettings)}
Cannot bind parameter 'Filter' to the target. Exception setting "Filter":
"Invalid filter syntax
任何人都知道从-filter参数返回所有ProtocolSettings的方法吗?
我使用的完整commnad如下:
get-mailbox -OrganizatinalUnit 'OU=test,DC=Domain,DC=com' `
-filter {(CustomAttribute14 -eq 'Test') -and (ProtocolSettings)}
答案 0 :(得分:0)
并非所有属性都是可过滤的。
以下是Exchange 2010的可过滤属性:
Filterable Properties for the -Filter Parameter
话虽这么说,您可以使用文本比较(例如,匹配等)从get-mailbox对该属性进行延迟过滤。使用Get-CASMailbox中的布尔启用设置将各个协议公开为单独的属性。