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.

    netsh interface ip set dns "Local Area Connection" static
    netsh interface ip add dns name="Local Area Connection" addr=

    netsh interface ip set dns "Local Area Connection" dhcp
      My ComputerSystem Spec
  2.    06 Apr 2017 #2
    Join Date : Oct 2014
    Posts : 920
    Windows 10 Pro

    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"

    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
    Join Date : Jul 2016
    Crewe Cheshire
    Posts : 1,451
    windows 10

    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

    Quote Originally Posted by Samuria 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.    06 Apr 2017 #6
    Join Date : Oct 2014
    Posts : 2,857
    Windows 10.4 Home 1709 x64

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


Similar Threads
Thread Forum
do we still have %~ in batch files in windows 10
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...
General Support
Solved Unable to change DNS servers in Windows 10 Home & Pro
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...
Network and Sharing
Solved Batch files won't run, open editor instead
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 ...
Software and Apps
How to change list of folders/files in File History back utility
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...
General Support
Batch Rename Deletes Files
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...
Performance & Maintenance
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 00:08.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App

Windows 10 Forums