Criterion Type, Operators, and Values
The previous section, “ConfigMgr Query Builder,” briefly described criterion, operators, and values (each displayed in Figure 7). However, each of these elements of a query deserves additional detail:
Criterion— Specify the type of criterion to use for comparison. The options follow:
Null value—
Compares a query attribute to a null value. An example of where you may
find a null value would be for a system that is discovered but has not
yet reported inventory. The System class would have valid data, but the
Computer System class would have no information, which would be a null
value. Another example would be when looking for systems that are not
ConfigMgr clients. You see that SystemResource contains the Client
attribute. Simply setting SystemResource.Client is not equal to 1
will not provide the expected results, because that attribute only
exists if the site knows that the system is not a client. The proper
query would include SystemResource.Client is NULL Or SystemResource.Client is 0.
Prompted value—
This is a placeholder for a simple value that prompts the user at
runtime. Using a prompted value provides additional flexibility to a
query. As an example, if you are querying information for a specific
computer, instead of statically entering the computer name into the
query, you can elect to use a prompted value. This capability allows you
to easily run the query for multiple systems without the need to create
additional queries. Another example is creating a query such as “C:
drive has less than x MB free.” Here, using a prompted value allows you to define the value of x when running the query. The prompted value type exists in queries, but not in collections.
Simple value—
Compares to a constant value. Selecting Simple value enables the simple
value settings. This is the most basic of operators. Use Simple value
when you are looking for a single criterion.
Attribute reference—
Compares to another attribute. Selecting Attribute reference enables
the attribute reference settings. In this case, you compare two
different attributes. One example is to find out all the PCs in which
the processor’s current clock speed is less than the maximum clock
speed.
SubSelected values—
Compares to results returned by another query. Selecting SubSelected
values enables the subselected values settings. You can use this when
you want to compare an attribute with the results of another query. One
good example is to find out all the computers that do not have specific
software.
List of values—
Compares to a list of constant values. Selecting List of values enables
the list of values settings. A classic example is listing all systems
where the chassis is classified as a notebook. For additional
information on chassis types, review information on the Win32_SystemEnclosure at http://msdn.microsoft.com/en-us/library/aa394474.aspx.
Figure 7
shows the Criterion Properties dialog box, where List of values is
specified as the Criterion Type setting. Cross-referencing the values
shown in Figure 7
with the Chassis Types property of the Win32_SystemEnclosure class will
show you that this query is for Portable, Laptop, Notebook, and Sub
Notebook chassis types.
Operator—
This dropdown field specifies how to assess the values. Options vary,
depending on the value defined for the criterion type. When the
criterion type is Simple, these values include the following:
Is equal to
Is greater than
Is greater than or equal to
Is less than
Is less than or equal to
Is like
Is not equal to
Is not like
Lowercase is equal to
Lowercase is greater than
Lowercase is greater than or equal to
Lowercase is less than
Lowercase is less than or equal to
Lowercase is like
Lowercase is not equal to
Lowercase it not like
Uppercase is equal to
Uppercase is greater than or equal to
Uppercase is less than
Uppercase is less than or equal to
Uppercase is like
Uppercase is not equal to
Uppercase is not like
Values—
Specify a value by entering it into the Value text box. You can also
click the Values... button, which will query ConfigMgr for a list of
possible values and allow you to select a value. If the number of
possible values is very large, the list is truncated. You can use
wildcards with strings by selecting one of the operators that uses the
Like clause: