Link to home
Start Free TrialLog in
Avatar of Auerelio Vasquez
Auerelio VasquezFlag for United States of America

asked on

DNS

Here is what i need done. I need to create a second dns server in our domain. I just want this server to mirror the one we already have is this possible ? 2. once server is created i need to go company and add this server to every one's tcp/ip settings. is there a way in dos to change this ? so i can create a batch file ? and not have to go around companywide and change this setting for DNS ?
ASKER CERTIFIED SOLUTION
Avatar of Drizzt420
Drizzt420

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or, if the first dns server is AD integrated, you just add a second one. pretty easy either way.

if you're not using dhcp, the following script was posted by someone on the programming board, it works great for changing settings. i wish i could remember who, but anyway, i can't take credit for it.

you should be all set, please give points to drizzt.

just save this in a text file and rename it to 'something'.vbs

Const strNewDNS1 = "10.10.10.10"
Const strNewDNS2 = "10.10.10.9"

Set objNICs = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_NetworkAdapterConfiguration")

For Each objNIC In objNICs
   If objNIC.IPEnabled Then
    objNIC.SetDNSServerSearchOrder Array(strNewDNS1,strNewDNS2)
   End If
Next