-
Notifications
You must be signed in to change notification settings - Fork 4
New AcmaQuery
Ryan Newington edited this page May 26, 2022
·
6 revisions
Creates a new query that searches for a particular attribute value. This cmdlet generates a DBQueryObject that can be used with the Get-AcmaObjects cmdlet
New-AcmaQuery -AttributeName<string> -Operator [[Contains | EndsWith | Equals | GreaterThan | GreaterThanOrEq | LessThan | LessThanOrEq | NotContains | NotEquals | StartsWith]] -Value <string>
The name of the attribute to query
The type of presence search to perform. Valid values depend on the type of the target attribute
The cmdlet returns an AcmaDBQueryObject
$query = New-AcmaQuery -AttributeName "accountName" -Operator StartsWith -Value "r"
$objects = Get-AcmaObjects $query
$query = New-AcmaQuery -AttributeName "deleted" -Operator GreaterThan -Value 0
$objects = Get-AcmaObjects $query
$query = New-AcmaQuery -AttributeName "department" -Operator Equals -Value "Finance"
$objects = Get-AcmaObjects $query