SMS_CollectionRuleQuery

The SMS_CollectionRuleQuery WMI class is an embedded object that generates members of a collection based on the results of a query.

The following syntax is simplified from MOF code and includes all inherited properties.

Class SMS_CollectionRuleQuery : SMS_CollectionRule
{
  string LimitToCollectionID;
  string QueryExpression;
  uint32 QueryID;
  string RuleName;
};

Properties

  • LimitToCollectionID
    Data type: string
    Access type: Read/write

    Identifier of the collection which limits the query results. Only those resources returned from the query that are also members of the collection specified in LimitToCollectionID become members of this collection.

  • QueryExpression
    Data type: string
    Access type: Read/write

    WQL SELECT statement whose results are used to populate the collection. The statement must specify a resource class name. You can use the LimitToCollectionID property to further limit the results. Note that the provider may alter the text of this query to make it more amenable to collection evaluation.

  • QueryID
    Data type: uint32
    Access type: Read-only

    Auto-generated identifier that is only useful when deleting or modifying a rule.

  • RuleName
    Data type: string
    Access type: Read/write

    Descriptive name that identifies the rule.

Methods

The following table lists the methods in SMS_CollectionRuleQuery.

Method Description
ValidateQuery Validates the collection rule query.

See Also

Collection Classes, SMS_Collection, SMS_CollectionRuleDirect