SMS_Collection 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_Collection Windows Management Instrumentation (WMI) class is an SMS Provider server class, in Configuration Manager, that represents a collection of resources related logically by rules, along with collection information.

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

 
Class SMS_Collection : SMS_BaseClass 
{ 
   String CollectionID; 
   SMS_CollectionRule CollectionRules[]; 
   SInt32 CollectionVariablesCount; 
   String Comment; 
   UInt32 CurrentStatus; 
   DateTime LastChangeTime; 
   DateTime LastMemberChangeTime; 
   DateTime LastRefreshTime; 
   String MemberClassName; 
   String Name; 
   Boolean OwnedByThisSite; 
   SMS_ScheduleToken RefreshSchedule[]; 
   UInt32 RefreshType; 
   Boolean ReplicateToSubSites; 
   SInt32 ServiceWindowsCount; 
};

Methods

The following table lists the methods in the SMS_Collection class.

Method Description

AMTOperateForCollection Method in Class SMS_Collection

Run an Active Management Technology (AMT) operation on this collection.

AMTOperateForMachines Method in Class SMS_Collection

Run an AMT operation on a set of computers.

AddMembershipRules Method in Class SMS_Collection

Adds more than one new rule to the CollectionRules property of SMS_Collection.

ApproveClients Method in Class SMS_Collection

Approves specified client computers to join the site.

BlockClients Method in Class SMS_Collection

Blocks specified client computers from communicating with the site.

ClearLastNBSAdvForCollection Method in Class SMS_Collection

Clears the last Network Boot advertisement for a selected collection.

ClearLastNBSAdvForMachines Method in Class SMS_Collection

Clears the last Network Boot advertisement for selected client computers.

CreateCCR Method in Class SMS_Collection

Creates a client configuration request (CCR) for a particular resource.

CreateCCRs Method in Class SMS_Collection

Generates client configuration requests (CCRs) for the computers in the collection.

DeleteAllMembers Method in Class SMS_Collection

Deletes all members, that is, resources and discovery data, for the collection.

DeleteMembershipRule Method in Class SMS_Collection

Deletes a membership rule from the collection.

DeleteMembershipRules Method in Class SMS_Collection

Deletes more than one membership rule from the collection.

GetNumResults Method in Class SMS_Collection

Gets a count of all members in a collection, excluding subcollections.

GetTotalNumResults Method in Class SMS_Collection

Gets a count of all members in a collection, including subcollections.

RequestRefresh Method in Class SMS_Collection

Triggers a re-evaluation of collection membership by the Configuration Manager collection evaluator component.

VerfiyNoLoops Method in Class SMS_Collection

Verifies that no loops are formed if one collection is the parent of another.

Properties

  • CollectionID
    Data type: String

    Access type: Read-only

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

    Unique auto-generated ID containing eight characters. The default value is "".

    The format of the collection ID is the site code that created the collection followed by a five-digit hexadecimal serial number, for example, "JAX0002C". The default Configuration Manager collections, created during the installation, use the "SMS" prefix, for example, "SMS00001".

  • CollectionRules
    Data type: SMS_CollectionRule Array

    Access type: Read/Write

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

    SMS_CollectionRule Server WMI Class objects defining the membership criteria for the collection.

  • CollectionVariablesCount
    Data type: SInt32

    Access type: Read-only

    Qualifiers: [read]

    Count of collection variables.

  • Comment
    Data type: String

    Access type: Read/Write

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

    General comment or note that documents the collection. The default value is "".

  • CurrentStatus
    Data type: UInt32

    Access type: Read-only

    Qualifiers: [read, enumeration, ResID(609), ResDLL("SMS_RSTT.dll")]

    Current status of the collection. Possible values are:

    0

    NONE

    1

    READY

    2

    REFRESHING

    3

    SAVING

    4

    EVALUATING

    5

    AWAITING_REFRESH

    6

    DELETING

    7

    APPENDING_MEMBER

    8

    QUERYING

  • LastChangeTime
    Data type: DateTime

    Access type: Read/Write

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

    Date and time of when the collection was last altered in any way.

  • LastMemberChangeTime
    Data type: DateTime

    Access type: Read/Write

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

    Date and time of when the collection membership was last altered.

  • LastRefreshTime
    Data type: DateTime

    Access type: Read/Write

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

    Date and time of when the collection membership was last refreshed.

  • MemberClassName
    Data type: String

    Access type: Read-only

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

    Class name having instances that are the members of the collection. The collection membership is not contained in SMS_Collection but is instead contained in the class name specified by this property. The class name is generated dynamically and is derived from SMS_CM_RES_COLL_CollectionID Server WMI Class.

  • Name
    Data type: String

    Access type: Read/Write

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

    The name of the collection. This value represents the collection in the Configuration Manager console and should be unique. The default value is "New Collection".

  • OwnedByThisSite
    Data type: Boolean

    Access type: Read/Write

    Qualifier: [ResID(604), ResDLL("SMS_RSTT.dll")]

    true if the collection originated at the local Configuration Manager site. The default value is false.

  • RefreshSchedule
    Data type: SMS_ScheduleToken Array

    Access type: Read/Write

    Qualifiers: [max(15), lazy, ResID(610), ResDLL("SMS_RSTT.dll")]

    SMS_ScheduleToken Server WMI Class objects indicating an update or refresh schedule for the collection. The collection membership is only updated if your application specifies a schedule or calls the RequestRefresh Method in Class SMS_Collection method. For the collection evaluator to use the schedule, the RefreshType property must be set to PERIODIC.

  • RefreshType
    Data type: UInt32

    Access type: Read/Write

    Qualifiers: [lazy, enumeration, ResID(608), ResDLL("SMS_RSTT.dll")]

    Refresh type indicating how Configuration Manager refreshes the collection. Possible values are listed below. The default value is MANUAL (1).

    1

    MANUAL

    2

    PERIODIC

    Set this property to PERIODIC to base the refresh on the schedule specified in RefreshSchedule. A setting of MANUAL manually updates the collection by using the RequestRefresh Method in Class SMS_Collection.

  • ReplicateToSubSites
    This property is not implemented.
  • ServiceWindowsCount
    Data type: SInt32

    Access type: Read-only

    Qualifiers: [read]

    Count of maintenance windows.

Remarks

Class qualifiers for this class include:

  • Secured

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

Collection information represented by this class includes the refresh schedule and the members, represented by SMS_CM_RES_COLL_CollectionID Server WMI Class objects. Your application can use a collection to target resources for software distribution.

When you run a query against a dynamic collection represented by SMS_Collection, ensure that the SMS Provider is loaded or that another method or query has already run.

The application should use the SMS_Collection methods to add, update, or delete membership rules defined by the CollectionRules property. This property is not retrieved when your application enumerates SMS_Collection. To obtain the collection rules for a collection, your application must use IWbemServices::GetObject or SWbemServices::Get. For more information, see Configuration Manager Context Qualifiers.

For information about using the SMS_Collection class and its methods, see Configuration Manager Collections.

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

Concepts

Software Distribution Server WMI Classes
SMS_CollectionRule Server WMI Class