Delete Membership Rule From Collection operation for Microsoft System Center Configuration Manager 2012
The Delete Membership Rule From Collection operation deletes a membership rule from the collection. This process is equivalent to removing a rule of "Query" type from the collection.
The following table describes the <items> XML elements for the Delete Membership Rule From Collection operation:
Elements for the <items> XML element and adapter request for the Delete Membership Rule From Collection operation
Element | Definition | Required |
|---|---|---|
<operation-name> | Specifies the name of the operation: delete-membership-rule-from-collection | Yes |
<arguments> | Specifies a list of arguments required for this operation | Yes |
<target> | Specifies the connection information for the Microsoft System Center Configuration Manager application | No |
<collection-id> | Specifies a string identifier for the collection whose membership rule is to be deleted | Yes |
<all> | Specifies whether to delete all the membership rules of the collection | No |
<rule-name> | Specifies the name of the membership rule to be deleted | No |
The following figure shows a sample adapter request for the Delete Membership Rule From Collection operation:
Sample adapter request for the Delete Membership Rule From Collection operation
<operation-name>delete-membership-rule-from-collection</operation-name>
<arguments>
<target>config1</target>
<collection-id>PRI00033</collection-id>
<rule-name>Test Rule</rule-name>
</arguments>
</mssccm-request>
The following figure shows the adapter response for the sample request:
Sample adapter response for the Delete Membership Rule From Collection operation
<metadata>
<status>success</status>
<response-count>1</response-count>
</metadata>
<responses>
<response>
<metadata>
<target>config1</target>
<status>success</status>
<count>1</count>
</metadata>
<output>
<message>Membership rule with RuleName: Test Rule from collection PRI00033 is deleted successfully.</message>
</output>
</response>
</responses>
</mssccm-response>