What Is the CMD Command to Check DNS Cache in Windows?
To check DNS Cache from the command prompt, use the ipconfig /displaydns
command.
ipconfig /displaydns
The following screenshot shows the output of the above command:
![check dns cache windows](https://s3.us-west-2.amazonaws.com/static.elearning.wsldp.com/images/questions/check-dns-cache-windows.webp)
There is also a PowerShell command to check the DNS cache, which is the Get-DnsClientCache
command.
Get-DnsClientCache
![command to check dns cache](https://s3.us-west-2.amazonaws.com/static.elearning.wsldp.com/images/questions/command-to-check-dns-cache.webp)
The ipconfig /displaydns
command works on both CMD and PowerShell. The Get-DnsClientCache
command only works on PowerShell.
To flush the DNS cache, use the ipconfig /flushdns
command on CMD and Clear-DnsClientCache
command on PowerShell.