Kaspersky Security Center Automation  10.0
HRESULT IKlAkGroups::GetSubgroups ( [in] long  nGroupId,
[in] long  nDepth,
[out, retval] IKlAkCollection **  ppInfo 

Acquire administration group subgroups tree.

Returns administration group subgroups tree.

nGroupId Id of existing group
nDepth depth of subgroups tree, 0 means all grandchildren tree with no limits
Return values:
ppInfo Array of containers IKlAkParams, each of them contains up to three attributes: "id" (subgroup id), "name" (subgroup name) and "groups" (similar recursive array).

See also How to see contents of the IKlAkParams container.
See JScript call sample below.

	function EnumerateGroups(oSubgroupsEnum)
		var enumObj = new Enumerator(oSubgroupsEnum);
		for (;!enumObj.atEnd();enumObj.moveNext())
			var oObj = enumObj.item();
			var nId = oObj.Item("id");
			var strName = oObj.Item("name");
			//process group here
				var groups = oObj.Item("groups");
	var oGroups = new ActiveXObject("klakaut.KlAkGroups");
	oGroups.AdmServer = ...
	//Enumerate all subgroups starting from root group "Managed computers"
	EnumerateGroups( oGroups.GetSubgroups(oGroups.GroupIdGroups, 0) );

See also Enumerating all groups sample.