Set-DnsClientServerAddress
CautionGet/set DNS servers
Set-DnsClientServerAddress -InterfaceAlias <if> -ServerAddresses <ip>
Reads/sets a NIC's DNS servers; -ResetServerAddresses returns to DHCP. Resolve DNS issues without the GUI.
Examples
Set-DnsClientServerAddress -InterfaceAlias 'Ethernet' -ResetServerAddressesBack to DHCP-supplied DNS
Syntax
Get-DnsClientServerAddress / Set-DnsClientServerAddress -InterfaceAlias a -ServerAddresses ip1,ip2
Before you run it
Bad values break all resolution.
Related commands
- Resolve-DnsNameTest DNS resolution
- ipconfigShow/refresh IP configuration
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store