Netsh util

J

Jason

I am trying to set a primary and secondary DNS servers in
my network config using netsh.

My problem is this, I have no problem setting the primary
but I cant find anything in any documentation to set the
seconday DNS box.

Here is the sytax of the command I am using

netsh int ip set dns L static x.x.x.x

any suggestions would be very helpful.

Thanks
Jason
 
S

Sandeep Rikhi

You can specify the index for that. Try the sample code below in "netsh
exec"

# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip

# Interface IP Configuration for "Local Area Connection"

set address name="Local Area Connection" source=static addr=a.b.c.d
mask=255.255.255.0
set dns name="Local Area Connection" source=static addr=x.x.x.x
register=BOTH
add dns name=""Local Area Connection" addr=p.q.r.s index=2
set wins name="Local Area Connection" source=static addr=w.w.w.w
add wins name="Local Area Connection" addr=y.y.y.y index=2


popd
# End of interface IP configuration
 

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