Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Static DNS via a script

Status
Not open for further replies.

Stel

IS-IT--Management
Oct 10, 2000
11
0
0
US

----------------------------------------------------------
*** The life of Merger America ***
----------------------------------------------------------

A new IP scheme is being implemented. I need to change the DNS IP addresses on all of the member servers (Win2K and some NT 4.0), 200+ of them. So I'm looking for a command shell script (bat file) that can either run locally or remote that would change these parameters.

I script a lot and I've yet to find a solution. Any thoughts or ideas would be greatly apprecitated.

Thanks in advance

Stel
 
Here is something I know works, but you have to have admin rights to the machine to run it.

netsh interface ip set dns name = "Local Area Connection 2" source = static addr = xx.xx.xx.xx
netsh interface ip add dns name = "Local Area Connection 2" addr = xx.xx.xx.xx
netsh interface ip show config

You can add all sorts of stuff to it and it will run via logon script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top