Jordan
January 6th 04, 07:36 PM
I have a couple of networks that I need to connect to and use the NETSH
command to change the IP addresses in my batch file. This works great
except I only know how to configure one DNS server. I would like to have at
least two. How can I modify the "set dns" line in the batch file so that I
have 2 DNS servers? ( the _ is means next line is on same line)
SwithNW.bat
====================
@REM IP and Subnet
netsh interface ip set address "Local Area Connection" _
static 192.168.1.61 255.255.255.0
@REM Gateway and Metric
netsh interface ip set address "Local Area Connection" _
gateway = 192.168.1.60 gwmetric = 10
@REM DNS Server
netsh interface ip set dns "Local Area Connection" source=static _
addr = 207.244.64.141 register=PRIMARY
====================
command to change the IP addresses in my batch file. This works great
except I only know how to configure one DNS server. I would like to have at
least two. How can I modify the "set dns" line in the batch file so that I
have 2 DNS servers? ( the _ is means next line is on same line)
SwithNW.bat
====================
@REM IP and Subnet
netsh interface ip set address "Local Area Connection" _
static 192.168.1.61 255.255.255.0
@REM Gateway and Metric
netsh interface ip set address "Local Area Connection" _
gateway = 192.168.1.60 gwmetric = 10
@REM DNS Server
netsh interface ip set dns "Local Area Connection" source=static _
addr = 207.244.64.141 register=PRIMARY
====================