根据我读过和遵循的一些示例,我认为这会非常简单......但是 Ps 对我大喊大叫。有什么想法这有什么问题吗?我是在 PS 窗口而不是 ISE 中执行此操作。
$name = "SharePoint Teams AS1"
$comment = "PowerShell Adaptive Scope Multiple Advanced Filter"
$locationtype = "Site"
$filterconditions = @{
"Conditions" = @(
"Value" = "https://sitename"
"Operator" = "Equals"
"Name" = "SPSiteURL"
},
@{
"Value" = "https://sitename"
"Operator" = "Equals"
"Name" = "SPSiteURL"
}
)
"Conjunction" = "Or"
}
New-AdaptiveScope `
-Name $name `
-Comment $comment `
-LocationType $locationtype `
-FilterConditions $filterconditions
最佳答案
您的情况是缺少一些括号和卷发男孩。
$filterconditions = @{
'Conditions' = @(
@{
'Value' = 'https://sitename'
'Operator' = 'Equals'
'Name' = 'SPSiteURL'
},
@{
'Value' = 'https://sitename'
'Operator' = 'Equals'
'Name' = 'SPSiteURL'
}
)
'Conjunction' = 'Or'
}
关于azure - Newb Powershell 问题创建自适应范围以实现合规性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72047709/