Multiple DNS Servers into W2K19 using netsh.

Doria 1,246 Reputation points
2021-07-15T19:41:26.027+00:00

Hi everyone!

How do I add multiple DNS Servers into a Windows Server 2019 core using netsh?

Thanks.

Windows for business Windows Server User experience Other
{count} vote

Accepted answer
  1. Anonymous
    2021-07-16T02:53:46.637+00:00

    Hi,

    I did a test in my lab and found that the command netsh interface ipv4 add dnsserver name=Ethernet address=192.168.0.101 index=1 can be run successfully in my Windows Server 2019 core.

    Here is my test result for your reference:

    My systeminfo result:

    115291-image.png

    115245-image.png

    115205-image.png

    ![115281-image.png

    Here is an article for your reference:

    Manually install a Server Core installation
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If you still cannot configure the DNS server on your server core, please help to provide related screenshots for further troubleshooting.

    Best Regards,
    Sunny


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-07-15T20:20:53.337+00:00

    You can find the interface name
    netsh interface show interface

    then add the DNS addresses
    netsh interface ipv4 add dnsservers "Ethernet" address=192.168.x.x

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. Doria 1,246 Reputation points
    2021-07-15T20:41:45.64+00:00

    I guess I was not clear enough.

    I need to add two DNS Servers into NIC TCP/IP settings, 10.168.1.4 and 10.168.1.5, but after I do it only last one shows in the ipconfig /all command output. It appears that the second address overwrites the primary one. :-(

    Thanks.

    0 comments No comments

  3. Anonymous
    2021-07-15T20:46:45.207+00:00

    You can do
    netsh interface ipv4 add dnsservers "Ethernet" address=10.168.1.4 index=1
    netsh interface ipv4 add dnsservers "Ethernet" address=10.168.1.5 index=2

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  4. Doria 1,246 Reputation points
    2021-07-15T21:32:00.75+00:00

    index= does not work in W2K19 core.

    I tried.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.