Will these batch files work to change DNS servers to OpenDNS and back?


  1. Posts : 133
    10
       #1

    Will these batch files work to change DNS servers to OpenDNS and back?


    I found the following on a forum post from 2007. I'm apprehensive, however, to try it because I obviously don't want to cause anything to stop working properly.

    1:
    netsh interface ip set dns "Local Area Connection" static 208.67.222.222
    netsh interface ip add dns name="Local Area Connection" addr=208.67.220.220
    ​2:

    2:
    netsh interface ip set dns "Local Area Connection" dhcp
      My Computer


  2. Posts : 2,068
    Windows 10 Pro
       #2

    Looks correct to me. Should work fine and not cause you problems. It's possible that your interface might not be called "Local Area Connection". You can check with

    netsh interface show interface.
      My Computers


  3. Posts : 133
    10
    Thread Starter
       #3

    This is what I get when I run "netsh interface show interface"


    Code:
    Admin State    State          Type             Interface Name
    -------------------------------------------------------------------------
    Enabled        Disconnected   Dedicated        Ethernet
    Enabled        Connected      Dedicated        Wi-Fi
    Does that show what I need?
      My Computer


  4. Posts : 8,111
    windows 10
       #4

    What is the point of this opendns is a great DNS with protection so why would you want to change it by default a lot the time the router is set as DNS?
      My Computer


  5. Posts : 133
    10
    Thread Starter
       #5

    Samuria said:
    What is the point of this opendns is a great DNS with protection so why would you want to change it by default a lot the time the router is set as DNS?
    I frequent a local library and, in order to access their wifi, the OpenDNS servers must be removed for some reason. I can switch them back once I've gotten past their acknowledgment page but I simply cannot get to this page with the custom servers. Consequently, I was looking for a batch script that would allow me to quickly remove, then re-add the OpenDNS servers.
      My Computer


  6. Posts : 5,452
    Windows 11 Home
       #6

    Or you could use NetSetMan - 2 clicks to change to a preset network.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:03.
Find Us




Windows 10 Forums