Udostępnij za pośrednictwem


SMS_Query Server WMI Class

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

The SMS_Query Windows Management Instrumentation (WMI) class is an SMS Provider server class, in Configuration Manager, that serves as a container for predefined queries.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.

Class SMS_Query : SMS_BaseClass
{
   String Comments;
   String Expression;
   String LimitToCollectionID;
     String Name;
   String QueryID;
     String TargetClassName;
};

Methods

The following table lists the methods in SMS_Query.

Method Description

CreateCCRs Method in Class SMS_Query

Generates client configuration requests (CCRs) for the query.

Properties

  • Comments
    Data type: String

    Access type: Read/Write

    Qualifiers: [ResID(1103), ResDLL("SMS_RSTT.dll")]

    Comments to document the query. The default value is "".

  • Expression
    Data type: String

    Access type: Read/Write

    Qualifiers:

    [ResID(1104),

    ResDLL("SMS_RSTT.dll")]

    WMI Query Language (WQL) text for the query. The default value is "".

  • LimitToCollectionID
    Data type: String

    Access type: Read/Write

    Qualifiers: [ResID(1106), ResDLL("SMS_RSTT.dll")]

    ID of a collection. This ID is used to limit the query results to resources that are members of the collection.

  • Name
    Data type: String

    Access type: Read/Write

    Qualifiers: [ResID(1102), ResDLL("SMS_RSTT.dll")]

    Name of the query as shown in the Configuration Manager console. The default value is "".

  • QueryID
    Data type: String

    Access type: Read-only

    Qualifiers: [read, key, ResID(1101), ResDLL("SMS_RSTT.dll")]

    Unique auto-generated ID for the query.

  • TargetClassName
    Data type: String

    Access type: Read/Write

    Qualifiers: [ResID(1105), ResDLL("SMS_RSTT.dll")]

    Name of the target class, found in the FROM clause of the query. The default value is "".

    This name is arbitrary for queries that perform a JOIN operation. The Configuration Manager console uses this property for display purposes to give the user an idea of the data that the query retrieves.

Remarks

Class qualifiers for this class include:

  • Secured

  • DisplayName("Query")

For more information about both the class qualifiers and the property qualifiers included in the Properties section, see Configuration Manager Class and Property Qualifiers.

You can use SMS_Query to persist valid queries that can be used later in an application or that can be run from the Configuration Manager console.

Instances of this class with the TargetClassName property set to an SMS_StatusMessage Server WMI Class object appear in the System Status node in the Configuration Manager console. All other instances appear in the Queries node.

Requirements

Runtime Requirements

For more information, see Configuration Manager Server Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Server Development Requirements.

See Also

Reference

SMS_Collection Server WMI Class

Concepts

Resource Management Server WMI Classes
SMS_StatusMessage Server WMI Class
About Configuration Manager Queries
How to Run a Configuration Manager Query
How to Create a Configuration Manager Query