Is it possible to create DNS entries using WMI (Windows Management Instrumentation)?
Thank you
Is it possible to create DNS entries using WMI (Windows Management Instrumentation)?
Thank you
Maybe this could help: Add DNS Resource
EDIT: Here's a VBScript snippet that might be useful
var sHostName = "SomeMachine"
var strRRsufix = ". IN A 192.168.51.200"; //some ip address
var strRR= sHostName + strRRsufix;
var objDNS = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\MicrosoftDNS");
var objRR = objDNS.Get("MicrosoftDNS_ResourceRecord");
var objDNSServer = objDNS.Get("MicrosoftDNS_Server.Name=\".\"");
objRR.CreateInstanceFromTextRepresentation(objDNSServer.Name, strDomain, strRR);