Kaspersky Security Center Automation  10.0
HRESULT IKlAkHosts::RemoveHosts ( [in] IKlAkCollection pHostNames,
[in] VARIANT_BOOL  bForceDestroy 
)

Remove multiple hosts.

Removes multiple hosts. Function behaviour depends on bForceDestroy flag. If bForceDestroy is true then hosts records are deleted (equivalent to calling method IKlAkHosts.RemoveHost for each of these hosts). If bForceDestroy is false hosts records will be deleted only for hosts located in group "Unassigned computers" or its subgroups, others will be moved into corresponding subgroups of group "Unassigned computers".

Parameters:
pHostNames array of host names
bForceDestroy whether to force deleting hosts records


See JScript call sample below.

	...
	var oHosts = new ActiveXObject("klakaut.KlAkHosts");
	oHosts.AdmServer = ...
	...
	var oHosts2Delete = new ActiveXObject("klakaut.KlAkCollection");
	//fill aray with host names
	...
	//Delete host records
	oHosts.RemoveHosts(oHosts2Delete, false);