AddMembershipRule Method in Class SMS_Collection
The AddMembershipRule
Windows Management Instrumentation (WMI) class method, in Configuration Manager, adds a new rule to the CollectionRules
property of the SMS_Collection Server WMI Class.
The following syntax is simplified from Managed Object Format (MOF) code and defines the method.
Syntax
SInt32 AddMembershipRule(
SMS_CollectionRule collectionRule,
UInt32 QueryID
);
Parameters
collectionRule
Data type: SMS_CollectionRule
Qualifiers: [in]
SMS_CollectionRule Server WMI Class object to add.
QueryID
Data type: UInt32
Qualifiers: [out]
Configuration Manager-generated query ID if the rule is a query rule. If the rule is direct, this ID is 0. Use QueryID
to modify or delete a query membership rule.
Return Values
An SInt32
data type that is 0 to indicate success or non-zero to indicate failure.
For more information about handling returned errors, see About Configuration Manager Errors.
Requirements
Runtime Requirements
For more information, see Configuration Manager Server Runtime Requirements.
Development Requirements
For more information, see Configuration Manager Server Development Requirements.