Kaspersky Security Center Automation
10.0
|
Create new host record. Creates new host record.
var oHosts = new ActiveXObject("klakaut.KlAkHosts"); oHosts.AdmServer = ... ... //group where hosts will be added var lGroup = ... ... var strPartOfName = "MyTestHost"; var strWinDomain = "MYTESTDOMAIN"; var strDnsDomain = "mytestdomain.com"; for(i = 0; i < 10; ++i) { //Fill container with attributes of host to add var oHostPars = new ActiveXObject("klakaut.KlAkParams"); oHostPars.Add("KLHST_WKS_DN", strPartOfName + "-" + i); oHostPars.Add("KLHST_WKS_GROUPID", lGroup); oHostPars.Add("KLHST_WKS_WINHOSTNAME", (strPartOfName + "-" + i).toUpperCase() ); oHostPars.Add("KLHST_WKS_DNSNAME", (strPartOfName + "-" + i).toLowerCase() ); oHostPars.Add("KLHST_WKS_WINDOMAIN", strWinDomain); oHostPars.Add("KLHST_WKS_DNSDOMAIN", strDnsDomain); //Add host var strAddedHost = oHosts.AddHost(oHostPars); ... }; |