Jump to content
Compatible Support Forums
Sign in to follow this  
Brad

Scripting of DNS changes

Recommended Posts

Hello all!

I am relatively new around here so hopefully I will get the posting protocol right. I am in a work/school situation which requires 3 separate ip setups. The first is DHCP with the dns obtained at login. The second is static with primary and secondary dns servers. Finally, the third also is static with a different set of dns servers. I have been able to write a batch which changes the ip from DHCP to either of the statics depending on a passed commandline parameter, however I cannot find a way to change the dns. If it is available under netsh I cannot find it, nor can I find adequate documentation about how to script it.

I am going to try doing it by direct registry manipulation tonight, but this is undesirable for obvious reasons. Certainly if there is a manner of changing the ip, there is a manner of changing the dns, right???

 

Thanks,

-Brad

 

ps. System is an Athlon 1.2gHz on Win2k with 320mb of ram

Share this post


Link to post

Hello again!

I actually was able to figure it out after some good old fashioned tinkering. Id be happy to send the code to anyone who is interested.

 

--Brian

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×