Link to home
Start Free TrialLog in
Avatar of Dan788
Dan788Flag for United States of America

asked on

Command line to set my Preferred and Alternate DNS Servers

Is there a command line command to set my Preferred and Alternate DNS Servers in Windows XP?

Thank you.
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

http://support.microsoft.com/?kbid=257748
it is easy like:

netsh interface ip set dns name="Local Area Connection" static 192.168.1.1
sorry id id not look at leews answer which is same as mine and correct :)
Avatar of Dan788

ASKER

Thank you leew and theruck

This works for the Preferred, but I get the following error using Alternate.  BTW, my intent here is to email everyone a batch file (containing this command) to set there Alternate DNS server.

C:\>netsh interface ip set dns  "Local Area Connection" static 192.168.0.2 alternate
alternate is not an acceptable value for register.
ASKER CERTIFIED SOLUTION
Avatar of theruck
theruck
Flag of Slovakia image

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
Avatar of Dan788

ASKER

Great!  index=2 works!

Thank you both
thank you?? and?