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:
There is also a PowerShell command to check the DNS cache, which is the Get-DnsClientCache
command.
Get-DnsClientCache
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.