How to Modify Preferred DNS Settings via PowerShell

How to Modify Preferred DNS Settings via PowerShell

September 16, 2021 Active Directory PowerShell 0

How to Update/Modify Preferred DNS Settings via Powershell

To get the Existing DNS Settings run the below command,

Get-DnsClientServerAddress

Need to get Interface Index for which you need to modify and New DNS information

To modify the DNS Settings, use the below command,

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


Now you can check Preferred DNS Settings with new values.

 3,103 total views,  6 views today

Leave a Reply

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