How to find Windows DNS Settings using Powershell

DNS, or the Domain Name System, translates human readable domain names (for example, www.amazon.com ) to machine readable IP addresses (for example, 192.0.2.44). This simple Powershell command will show your current Windows DNS settings:

Get-DnsClientServerAddress

Example output will show DNS server addresses for each interface on IPv4 and IPv6: ps1

To show DNS settings for specific network interface, just affix the interface alias to the command. For Ethernet (Wired) DNS settings, use this command:

Get-DnsClientServerAddress Ethernet

ps2

For Wireless (Wi-FI) DNS settings, use this command:

Get-DnsClientServerAddress Wi-Fi

ps3

Further reads:

  1. https://devblogs.microsoft.com/scripting/powertip-use-powershell-to-get-dns-settings/
  2. https://devblogs.microsoft.com/scripting/tag/windows-powershell/