View the DNS client cache on Windows
Inspect cached DNS records with Get-DnsClientCache before or instead of flushing.
01Command
$ Get-DnsClientCache | Format-Table Entry, Data, TimeToLive -AutoSize02What it does
Windows caches every DNS answer to speed up browsing, but a stale or poisoned cache entry can send you to the wrong server. Get-DnsClientCache lists each cached record, its data and remaining TimeToLive, so you can confirm whether a hostname is being answered from cache. If an entry is wrong, flush it with `ipconfig /flushdns` and resolve again.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-DnsClientCacheEvidence: Retrieves the contents of the local DNS client cache, including entry names and record data.
- netshEvidence: Documents netsh WLAN commands including `netsh wlan show profile name=... key=clear` and `netsh wlan delete profile name=...`.
Last verified: 2026-09-18 · Category: Network
06Related solutions
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.
Display the IP-to-MAC address cache Windows built by talking to neighbors — a quick way to spot which devices are on your subnet.