Kaspersky Security Center Automation  10.0
HRESULT IKlAkHstRulesEx::AddHstMoveRule ( [in] IKlAkParams pInfo,
[out, retval] long *  plHstMoveRule 
)

Add extended host moving rule.

Creates new extended host moving rule with specified attributes.

Parameters:
pInfo IKlAkParams object containing rule attributes, see List of extended host moving rule attributes. Following attributes are required.
  • KLHST_MR_DN
  • KLHST_MR_Group
  • KLHST_MR_Options
  • KLHST_MR_Query
Return values:
plHstMoveRule id of created rule.

Supports enumerating (See JScript sample below).

	var oCustom = new ActiveXObject("klakaut.KlAkParams"); 
	oCustom.Add("MyComment", "Rule #1");
	var oProps = new ActiveXObject("klakaut.KlAkParams"); 
	oProps.Add("KLHST_MR_DN", "My test rule #1"); 
	oProps.Add("KLHST_MR_Group", 1); 
	oProps.Add("KLHST_MR_Options", 0);  // Rule affects each filtered host once
	oProps.Add("KLHST_MR_Query", "(&(KLHST_WKS_FROM_UNASSIGNED <> 0)(KLHST_WKS_WINHOSTNAME=\"TEST*"))"); 
	oProps.Add("KLHST_MR_Custom", oCustom);
	oHstRules.AddHstMoveRule(oProps);