The VerifyNoLoops Windows Management Instrumentation (WMI) class method, in Configuration Manager, verifies that no loops are formed if one collection is the parent of another.
The following syntax is simplified from Managed Object Format (MOF) code and is intended to show the definition of the method.
SInt32 VerifyNoLoops( ref:SMS_Collection parentCollection, ref:SMS_Collection subCollection, Boolean Result ); |
Parameters
- parentCollection
- Data type: ref:SMS_CollectionQualifiers: [in]Object path to the parent collection.
- subCollection
- Data type: ref:SMS_CollectionQualifiers: [in]Object path to the child collection.
- Result
- Data type: BooleanQualifiers: [out]true if the supplied parent-child relationship does not create a loop condition. If this parameter is set to false, the child collection should not be part of the parent collection.
Return Values
An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.
For information about handling returned errors, see About Configuration Manager Errors.
Remarks
The application should use this method before creating a parent-child relationship in SMS_CollectToSubCollect Server WMI Class or SMS_CollectToSubCollect_a Server WMI Class.
Example Code
The following example shows how to use the VerifyNoLoops method.
Copy Code | |
---|---|
Dim clsCollection As SWbemObject ' SMS_Collection class definition. Dim Result As Boolean ' Loop condition? Set clsCollection = Services.Get("SMS_Collection") clsCollection.VerifyNoLoops "SMS_Collection.CollectionID=""<collectionid>""", _ "SMS_Collection.CollectionID=""<collectionid>""", _ Result |
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
Send comments about this topic to Microsoft.