简体   繁体   English

过滤Get-BrokerApplication不起作用

[英]Filtering Get-BrokerApplication not working

I want to only filter on certain applications that start with MS but I'm getting an error. 我只想过滤以MS开头的某些应用程序,但出现错误。 Thanks in advance. 提前致谢。

$Applist = Get-BrokerApplication -AdminAddress DDC -filter "MS"
foreach ($app in $Applist)
{
    Add-XAApplicationAccount $app -accounts "domain\users
}

I did a read up on the filter syntax of those cmdlets here . 对这些cmdlet的过滤器语法我也读了这里 It works similar to how regular PowerShell cmdlets treat filter. 它的工作方式类似于常规PowerShell cmdlet处理过滤器的方式。 One of the examples from the site 该站点的示例之一

Get-<Noun> -Filter 'Name -like "High*" -or (Priority -eq 1 -and Severity -ge 2)'

I would guess that the error you are getting is about the format of the input for filter being incorrect. 我猜想您得到的错误与过滤器输入格式不正确有关。 You need to be using similar syntax to what I show above. 您需要使用与我上面显示的语法类似的语法。 So a guess would be 所以猜测是

Get-BrokerApplication -AdminAddress DDC -filter 'Name -like "MS*"'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM