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

  1.    06 Apr 2017 #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 ComputerSystem Spec

  2.    06 Apr 2017 #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 ComputerSystem Spec

  3.    06 Apr 2017 #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 ComputerSystem Spec

  4.    06 Apr 2017 #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 ComputerSystem Spec

  5.    06 Apr 2017 #5

    Samuria said: View Post
    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 ComputerSystem Spec


  6. Posts : 3,151
    10.5 Home 1803 x64
       06 Apr 2017 #6

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


 

Related Threads
Greetings I still write batch files like I always did since dos. In windows XP all kinds of %~ variables were added to the vocabulary. Do we still have those or were they replaced by other in windows 10? where do I find a list of batch file...
Good afternoon all, I've been trying to change DNS servers for the best part of a day but Windows 10 (both Home & Pro) is steadfastly resisting my attempts. I've set the IPv4 adapter settings for both Google and OpenDNS servers but when I run...
Somehow (most likely my fault) .bat files have defaulted to opening my text editor (UltraEdit) instead of executing. I took all the file associations out of UltraEdit and re-started - no change I followed internet advice to remove ...
I was trying the File History backup utility and of course it defaulted to a preset of folders/files as I did not "Remove" any. Actually what I really want to is only backup a single folder that I warehouse selected data in (C\special docs) What I...
Batch Rename Deletes Files in Performance & Maintenance
Hey all, I just upgraded to Windows 10 last night, and I've been playing around with the new File Explorer. One thing I tried was the batch rename function (by which I mean just selecting multiple files and clicking "rename"). I quickly realized...
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 07:44.
Find Us