Kaspersky Security Center Automation
10.0
|
Add new diapason with specified attributes. Adds new diapason with the specified attributes (see List of network diapason attributes). Error occurs if at least one of intervals/subnet intersects with any of existing intervals/subnets. Following attributes are required.
var oIpSubnets = new ActiveXObject("klakaut.KlAkIpSubnets"); oIpSubnets.AdmServer = ... ... var strSubnet = "172.17.14.0/24"; var oIpConversions = new ActiveXObject("klakaut.KlAkIpConversions"); //prepare intervals array var oIntervals = new ActiveXObject("klakaut.KlAkCollection"); oIntervals.SetSize(1); oIntervals.SetAt(0, oIpConversions.ConvertSubnet(strSubnet)); var oPars = new ActiveXObject("klakaut.KlAkParams"); oPars.Add("KLDPNS_DN", "Test diapason - " + strSubnet); // display name oPars.Add("KLDPNS_ILS", oIntervals); //set intervals array oPars.Add("KLDPNS_LF", 3600*8); // 8 hours oPars.Add("KLDPNS_ScanEnabled", false); //disable network scan for subnet var idDiapason = oIpSubnets.AddDiapason(oPars);
See also Creating ip subnets based on AD Site and Services sample. |