Having DNS resolution problems? Do you need to clear the DNS cache on a Windows 10 computer or Server?
Then you’re in the right place.
In this post, I’ll show you how to quickly clear the DNS cache using the command line, Windows Server DNS console and PowerShell.
Clear DNS Cache on Windows 10
This also works on older Windows operating systems.
Step 1: Open command prompt
Click the Windows start button and type cmd
Click on Command Prompt to open
Step 2: Enter the following command
With command prompt open type:
That’s it for flushing the local cache. If you want to check the local cache then move on to step 3.
Step 3: View DNS Resolver cache (Optional)
This is another simple command just type:
This will display all the local cache entries.
Clear DNS Cache on Windows DNS Server
Maybe it’s not a local client issue, maybe your server has a bad cache entry. Follow these steps to clear the cache on your Windows Server.
In this example, I’m using Windows Server 2016.
This is super easy, just open the DNS console, right-click the DNS server and select clear cache
Clear DNS Cache Using PowerShell
To clear the client cache using PowerShell use this command:
To clear the local DNS server cache use this command:
To clear the DNS cache on a specific DNS server use this command. Change -ComputerName to the name of the server you want to clear
Clear-DnsServerCache –ComputerName "DC1" -Force
If you still have DNS issues then check out my guide on using nslookup to test DNS, it includes 8 tips for troubleshooting DNS problems.
Recommended Tool: SolarWinds Server & Application Monitor (SAM)
This utility was designed to Monitor Active Directory and other critical applications. It will quickly spot domain controller issues, prevent replication failures, track failed logon attempts and much more.
What I like best about SAM is it’s easy to use dashboard and alerting features. It also has the ability to monitor virtual machines and storage.