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 |
---|---|
Run an Active Management Technology (AMT) operation on this collection. |
|
Run an AMT operation on a set of computers. |
|
Adds more than one new rule to the CollectionRules property of SMS_Collection. |
|
Approves specified client computers to join the site. |
|
Blocks specified client computers from communicating with the site. |
|
Clears the last Network Boot advertisement for a selected collection. |
|
Clears the last Network Boot advertisement for selected client computers. |
|
Creates a client configuration request (CCR) for a particular resource. |
|
Generates client configuration requests (CCRs) for the computers in the collection. |
|
Deletes all members, that is, resources and discovery data, for the collection. |
|
Deletes a membership rule from the collection. |
|
Deletes more than one membership rule from the collection. |
|
Gets a count of all members in a collection, excluding subcollections. |
|
Gets a count of all members in a collection, including subcollections. |
|
Triggers a re-evaluation of collection membership by the Configuration Manager collection evaluator component. |
|
Verifies that no loops are formed if one collection is the parent of another. |
Properties
CollectionID
Data type: StringAccess 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 ArrayAccess 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: SInt32Access type: Read-only
Qualifiers: [read]
Count of collection variables.
Comment
Data type: StringAccess 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: UInt32Access 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: DateTimeAccess 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: DateTimeAccess type: Read/Write
Qualifiers: [ResID(613), ResDLL("SMS_RSTT.dll")]
Date and time of when the collection membership was last altered.
LastRefreshTime
Data type: DateTimeAccess type: Read/Write
Qualifiers: [ResID(606), ResDLL("SMS_RSTT.dll")]
Date and time of when the collection membership was last refreshed.
MemberClassName
Data type: StringAccess 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: StringAccess 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: BooleanAccess 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 ArrayAccess 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: UInt32Access 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: SInt32Access 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