VerifyNoLoops Method in Class SMS_Site
The VerifyNoLoops WMI class method determines if the insertion of a site in the site hierarchy at a specific point will result in a recursive loop of the sites.
The following syntax is simplified from MOF code and is intended to show you the definition of the method.
sint32 VerifyNoLoops(
[in] string CentralSiteCode,
[in] string TargetSiteCode,
[in] string ParentSiteCode,
[out] boolean Result
);
Parameters
CentralSiteCode
Data type: string
Qualifiers: InNot used.
TargetSiteCode
Data type: string
Qualifiers: InSite code of the child site to insert.
ParentSiteCode
Data type: string
Qualifiers: InSite code of the site that will be the parent of the target site.
Result
Data type: boolean
Qualifiers: OutIndicates whether the inserted site does not cause a loop. A value of TRUE indicates that no loop is formed by inserting the new site in the hierarchy.
Return Values
The VerifyNoLoops method returns a sint32 that is always zero (0).
Example Code
The following example shows you how to call the VerifyNoLoops method.
Dim Site As SWbemObject Dim NoLoop As Boolean Set Site = GetObject("winmgmts:root\sms\site_<sitecode>:SMS_Site") Site.VerifyNoLoops "", "<child sitecode>", "<parent sitecode>", NoLoop MsgBox "NoLoop = " & NoLoop