View DNS server addresses per network adapter on Windows
List the DNS servers configured for every interface using the built-in DNSClient PowerShell module, with clean per-adapter output.
01Command
$ Get-DnsClientServerAddress -AddressFamily IPv4 | Format-Table InterfaceAlias,InterfaceIndex,ServerAddresses -AutoSize02What it does
Get-DnsClientServerAddress is the modern NetTCPIP-family cmdlet that replaces squinting at ipconfig /all. It separates adapter-level and connection-specific DNS settings and supports -AddressFamily to hide IPv6 noise. Filtering to InterfaceIndex lets you script per-interface checks, e.g. verifying a VPN adapter did not override corporate resolvers.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-DnsClientServerAddress | Microsoft LearnEvidence: Microsoft documents Get-DnsClientServerAddress as the cmdlet that retrieves DNS server addresses configured on the computer, filtered by AddressFamily and interface.
Last verified: 2026-09-17 · Category: Network
06Related solutions
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.
Purge cached DNS lookups so Windows re-resolves hostnames from scratch — the fix for 'the new server is live but my browser still hits the old one'.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.