Pcornel
Windows

DNS Client

Cheat sheet · https://pcornel.dk/topic.php?topic=3088

Back to the Topic

Answer

The Windows DNS client resolves names using its cache, the hosts file, configured DNS servers and suffix search lists, and registers the computer's own records dynamically in DNS.

Remember

  • The hosts file wins over DNS.
  • Negative answers are cached too.
  • Domain members must use internal DNS only.

First checks

  • Resolve-DnsName <name> — resolve via the Windows resolver
  • Get-DnsClientServerAddress — DNS servers per interface
  • Get-DnsClientCache — resolver cache
  • Get-DnsClientGlobalSetting — suffix search list
  • Clear-DnsClientCache — flush the cache

Commands

Clear-DnsClientCache
Clear the Windows DNS client cache.
Resolve-DnsName
Query DNS from PowerShell, with record type and server options.
nslookup
Query DNS servers from Windows.

Verify in this order

application → DNS Client service → cache/hosts → servers → answer

Where it usually breaks

First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3088

Confirmation

Confirm action

Continue?