aumatically settings DNS IP addresses on client

P

parhez Sattar

Is there a way to add additional DNS server IP addresses
to Win2K clients, in an NT domain environment? We are
preparing for our upgrade to W2K3 AD domain and need to
make each of the clients aware of the DNS servers that
will point them to the DCs. Thanks in advance.
 
P

Parhez Sattar

Sorry to have failed to mention that "DHCP"
and "Forwarding from the existing Unix DNS Server" are not
options for me. I am looking for more of a
remote/scripted/GP solutions.
 
A

Ayhan

strIPaddr=Array("XXX,xXX,XXX,XXX")
strSNMask=Array("XXX,xXX,XXX,XXX")
strGateway=Array("XXX,xXX,XXX,XXX")
strPWINS="XXX,xXX,XXX,XXX"
strSWINS="XXX,xXX,XXX,XXX"
strPDNS= "XXX,xXX,XXX,XXX"
strSDNS= "XXX,xXX,XXX,XXX"
strDNSServer=Array(strPDNS, strSDNS)

Set objService=GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objEnumerator=objService.ExecQuery("Select * From
Win32_NetworkAdapterConfiguration Where DatabasePath IS NOT NULL")

objService.Security_.impersonationlevel = 3

For Each objInstance in objEnumerator
intStatus=objInstance.SetWINSServer (strPWINS, strSWINS)
intStatus=objInstance.SetDNSServerSearchOrder(strDNSServer)
intStatus=objInstance.EnableStatic (strIPaddr, strSNMask)
intStatus=objInstance.SetGateways(strGateway)
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top