Reset DNS Cache

Code Properties

  • Language: PowerShell/CMD
  • Tools: ipconfig, nbtstat, netsh

Overview

Commands to flush DNS cache and reset network settings on Windows. Useful for resolving DNS-related connectivity issues.

Code

ipconfig /flushdns
nbtstat -R
nbtstat -RR
netsh int reset all
netsh int ip reset
netsh winsock reset

Usage

Run commands as Administrator:

# flush DNS resolver cache
ipconfig /flushdns
 
# purge NetBIOS name cache
nbtstat -R
 
# release and refresh NetBIOS names
nbtstat -RR
 
# reset all network interfaces
netsh int reset all
 
# reset TCP/IP stack
netsh int ip reset
 
# reset Winsock catalog
netsh winsock reset
 
# restart computer to complete reset
Restart-Computer -Force

Appendix

Note created on 2024-09-27 and last modified on 2024-12-31.

See Also


(c) No Clocks, LLC | 2024