Kaspersky Security Center Automation
10.0
|
Acquire administration group subgroups tree. Returns administration group subgroups tree.
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 ... if(oObj.Check("groups")) { var groups = oObj.Item("groups"); EnumerateGroups(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. |