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.

WindowsnetworkDNSpowershellLow risk
Run Get-DnsClientServerAddress in PowerShell to see the DNS servers assigned to each network interface.

01Command

Command
$ Get-DnsClientServerAddress -AddressFamily IPv4 | Format-Table InterfaceAlias,InterfaceIndex,ServerAddresses -AutoSize

02What 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

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-DnsClientServerAddress | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: 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