Jump to content

Set DNS Settings on Interfaces


johann
 Share

Recommended Posts

Hi Folks,

currently we are moving many computers from one to another domain and the admin over here messed with the DNS settings on many of the machines. Some settings can be easily fixed in the key

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ which I set with an AutoIT Script.

But there is one setting which is tied to the network interface card. So the setting I want to adjust is a value under a key which is not the same on every client.

My suggestion now would be to just set it in every interface (does not matter if it is set on every or just the LAN interface). But how do I read out all Regkeys under a certain key and use this list to alter a value under each of those keys?

eg:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Adapters\{2DB8EBB4-CC69-4669-9B79-CSCF22C41BOB}

The last part is what is different on every client and those keys very in the number of adapter too.

Any help would be appreciated.

Sorry for my lack of knowledge in Auto-IT scripting

johann

Edited by johann
Link to comment
Share on other sites

I don't know if this could help you but you can use netsh (windows) command.

DNS example

netsh interface ip set dns "Local Area Connection" static 208.67.222.222

for the IP mask gateway use:

netsh interface ip set address "Local Area Connection" static IP MASK GATEWAY

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...