locked
How to remove default IPv6 DNS IP ::1 for Local host RRS feed

  • Question

  • Hi Team,

    When we install the Windows 2012 R2 and by default IPv6 setting obtail IP address automatically but for DNS it is already assign and that is ::1 

    How can I remove this setting ::1 IP & make setting to obtain DNS IP automattically using powershell command.

    Thanks



    NM-BG


    • Edited by BG-NM Monday, November 27, 2017 2:11 PM
    Monday, November 27, 2017 2:11 PM

Answers

  • Thanks Albert this was useful but I was having multiple NIcs on the machine to identify the exact nic to chnage the DNS parameter here I use the Script to work perfect.

    $IPstart="10.11"
    $IPaddInterface = Get-NetIPAddress| where IPv4Address -Match $IPstart
    $NICIndexnumber = $IPaddInterface.InterfaceIndex

    Get-DnsClientServerAddress -InterfaceIndex $NICIndexnumber -AddressFamily IPv6 | Set-DnsClientServerAddress -ResetServerAddresses

    Thanks for your help.



    NM-BG

    • Marked as answer by BG-NM Friday, December 1, 2017 7:30 AM
    Friday, December 1, 2017 7:30 AM

All replies

  • Hi NM-BG,

    Based on my research, you can have a try with the following command. Hope it is helpful to you:
    Get-DnsClientServerAddress -InterfaceAlias 'YourInterfaceAlias' -AddressFamily IPv6 | Set-DnsClientServerAddress -ResetServerAddresses

    If you need further help, please feel free to let us know.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, November 28, 2017 7:06 AM
  • Hi,

    Just checking in to see if the information provided was helpful. Does the script work?

    Please let us know if you would like further assistance.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, November 30, 2017 5:46 AM
  • Thanks Albert this was useful but I was having multiple NIcs on the machine to identify the exact nic to chnage the DNS parameter here I use the Script to work perfect.

    $IPstart="10.11"
    $IPaddInterface = Get-NetIPAddress| where IPv4Address -Match $IPstart
    $NICIndexnumber = $IPaddInterface.InterfaceIndex

    Get-DnsClientServerAddress -InterfaceIndex $NICIndexnumber -AddressFamily IPv6 | Set-DnsClientServerAddress -ResetServerAddresses

    Thanks for your help.



    NM-BG

    • Marked as answer by BG-NM Friday, December 1, 2017 7:30 AM
    Friday, December 1, 2017 7:30 AM
  • Hi,

    Good to hear that you have solved this issue by yourself. In addition, thanks for sharing your solution in the forum as it would be helpful to anyone who encounters similar issues.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,
    Albert Ling


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, December 1, 2017 7:35 AM