Easy handling before removing DNS

Prior to changing the IP or demoting a DNS server it is best to repoint all clients pointing to this DNS server to other DNS server. To assist in this I have written the following script. It requires the DNS service to have debug logging enabled. By running the script and pointing to the debug file, you will get an easy to handle array. Unless you specify a filename for the debuglog it will be in the file %SystemRoot%\system32\dns\dns.log

Download the script from the Microsoft social scripting archive.

Some examples:

Get all queries:

Get all except some queries:

Well that is too much information:


  1. Vijay Sharma says:


    Can you please share the Correct DNS pattern that will work will most of the dates pattern.
    I am getting the errors like” Rows does not match the DNS pattern”


    • virot says:

      If you are having issues can you please send me a few lines of your logs and Ill try to figure it out. There are lots of different versions.

Leave a Reply