{"id":2207,"date":"2016-09-21T20:46:00","date_gmt":"2016-09-21T20:46:00","guid":{"rendered":"http:\/\/pariswells.com\/blog\/?p=2207"},"modified":"2016-09-21T20:46:00","modified_gmt":"2016-09-21T20:46:00","slug":"scripting-dns-debug-logging-dnscmd","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/random\/scripting-dns-debug-logging-dnscmd","title":{"rendered":"Scripting DNS Debug Logging dnscmd"},"content":{"rendered":"<p>To be able to script the DNS Debug Location for multiple severs you need to run the following command<img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-2208 img-responsive\" src=\"http:\/\/pariswells.com\/blog\/wp-content\/uploads\/2016\/09\/DNS_DebugLogging1-150x150.png\" alt=\"dns_debuglogging1\" width=\"150\" height=\"150\" \/><\/p><p><strong>dnscmd\u00a0&lt;DNS Server Name&gt; \/config \/logLevel &lt;EventFlagSumInHex&gt;<\/strong><\/p><p><strong>dnscmd\u00a0&lt;DNS Server Name&gt; \/config \/logfilepath c:\\DNSlogs.txt<\/strong><\/p><p>However the Hex Value&#8217;s are pretty confusing below. So instead you can login to a server and set the options you want via the GUI , then afterwards go to this Registry Location<\/p><p>HKLM\\System\\CurrentControlSet\\Services\\DNS\\Parameters\\LogLevel<\/p><p>And copy the EventFlagSuminHex to the script<\/p><p>This can also be done with VBS ( Google for Code ) using the Deciaml Value<\/p><p><strong>Hex Values<\/strong><\/p><p class=\"title\">Table\u00a013-2.\u00a0DNS debug logging event codes<\/p><div class=\"table-contents\"><table summary=\"DNS debug logging event codes\"><thead><tr><th><p>Hexadecimal value<\/p><\/th><th><p>Decimal value<\/p><\/th><th><p>Descriptions<\/p><\/th><\/tr><\/thead><tbody><tr><td><p>0x0<\/p><\/td><td><p>0<\/p><\/td><td><p>No logging. (This is the default)<\/p><\/td><\/tr><tr><td><p>0x1<\/p><\/td><td><p>1<\/p><\/td><td><p>Queries transactions<\/p><\/td><\/tr><tr><td><p>0x10<\/p><\/td><td><p>16<\/p><\/td><td><p>Notifications transactions<\/p><\/td><\/tr><tr><td><p>0x20<\/p><\/td><td><p>32<\/p><\/td><td><p>Updates transactions<\/p><\/td><\/tr><tr><td><p>0xFE<\/p><\/td><td><p>254<\/p><\/td><td><p>Non-queries transactions<\/p><\/td><\/tr><tr><td><p>0x100<\/p><\/td><td><p>256<\/p><\/td><td><p>Question packets<\/p><\/td><\/tr><tr><td><p>0x200<\/p><\/td><td><p>512<\/p><\/td><td><p>Answer packets<\/p><\/td><\/tr><tr><td><p>0x1000<\/p><\/td><td><p>4096<\/p><\/td><td><p>Send packets<\/p><\/td><\/tr><tr><td><p>0x2000<\/p><\/td><td><p>8192<\/p><\/td><td><p>Receive packets<\/p><\/td><\/tr><tr><td><p>0x4000<\/p><\/td><td><p>16384<\/p><\/td><td><p>UDP packets<\/p><\/td><\/tr><tr><td><p>0x8000<\/p><\/td><td><p>32768<\/p><\/td><td><p>TCP packets<\/p><\/td><\/tr><tr><td><p>0xFFFF<\/p><\/td><td><p>65535<\/p><\/td><td><p>All packets<\/p><\/td><\/tr><tr><td><p>0x10000<\/p><\/td><td><p>65536<\/p><\/td><td><p>AD write transactions<\/p><\/td><\/tr><tr><td><p>0x20000<\/p><\/td><td><p>131072<\/p><\/td><td><p>AD update transactions<\/p><\/td><\/tr><tr><td><p>0x1000000<\/p><\/td><td><p>16777216<\/p><\/td><td><p>Full packets<\/p><\/td><\/tr><\/tbody><\/table><\/div>","protected":false},"excerpt":{"rendered":"<p>To be able to script the DNS Debug Location for multiple severs you need to run the following commanddnscmd\u00a0&lt;DNS Server Name&gt; \/config \/logLevel &lt;EventFlagSumInHex&gt;dnscmd\u00a0&lt;DNS Server Name&gt; \/config [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1609,1612,1611,1610],"class_list":["post-2207","post","type-post","status-publish","format-standard","hentry","category-random","tag-dnscmd","tag-eventflagsuminhex","tag-hex","tag-loglevel"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=2207"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2207\/revisions"}],"predecessor-version":[{"id":2209,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2207\/revisions\/2209"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=2207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=2207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=2207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}