How to Update DNS Settings using Powershell

In this article, we will see how to modify the DNSSettings using PowerShell.
it will help for the core server modifications as well.

To get the Existing DNS Settings run the below command,



To modify the DNS Settings, use the below command,

Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses (“″,””)

Note: Need to get Interface Index for which you need to modify and New DNS Server followed with (,).


You can see the at DNS Settings for the Ethernet –Interface Index — 12.

Leave a Reply

Your email address will not be published. Required fields are marked *