Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to change DNS Server with CMD?  (Read 13862 times)

0 Members and 1 Guest are viewing this topic.

Windows User

    Topic Starter


    Greenhorn

    • Experience: Familiar
    • OS: Windows 10
    How to change DNS Server with CMD?
    « on: March 21, 2022, 04:31:06 AM »
    By using the command below i managed to change the DNS server to cloudflare.
    interface ip set dns "Ethernet" static 1.1.1.1

    How can i changed not only the primary but the alternate DNS Server to 1.0.0.1
    What is the command?

    Windows User

      Topic Starter


      Greenhorn

      • Experience: Familiar
      • OS: Windows 10
      Re: How to change DNS Server with CMD?
      « Reply #1 on: March 21, 2022, 04:34:01 PM »
      Update:
      Booth these commands appear to be working perfectly.

      netsh interface ip add dnsservers "Ethernet" address=1.0.0.1 index=1
      netsh interface ip add dnsservers "Ethernet" address=1.1.1.1 index=1

      netsh interface ipv4 add dnsservers "Ethernet" address=1.1.1.1
      netsh interface ipv4 add dnsservers "Ethernet" address=1.0.0.1