Clear DNS cache on local and Remote Computers

If you need to flush the DNS cache on your computer or remote computers, you can use the old dos command ipconfig /flushdns. PowerShell is still a friend with old commands, but I prefer to use PowerShell cmdlets.

Instead of using ipconfig /flushdns, in PowerShell we now will use the Clear-DnsClientCache cmdlet. If you need to clear the DNS cache on a remote computer, we will use the Invoke-Command cmdlet.

Clear DNS cache on a local computer

To clear the DNS cache on a local computer, open PowerShell and enter the following command:

Clear DNS cache on remote computers

Now we will use the Invoke-Command cmdlet to run the command on the remote computers.

Note: you need to run the above command with administrator privileges

In this article I’ll show you how to clear the DNS cache on a local or remote computer using PowerShell.

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon!

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply