To be able to script the DNS Debug Location for multiple severs you need to run the following command
dnscmd <DNS Server Name> /config /logLevel <EventFlagSumInHex>
dnscmd <DNS Server Name> /config /logfilepath c:\DNSlogs.txt
However the Hex Value’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
HKLM\System\CurrentControlSet\Services\DNS\Parameters\LogLevel
And copy the EventFlagSuminHex to the script
This can also be done with VBS ( Google for Code ) using the Deciaml Value
Hex Values
Table 13-2. DNS debug logging event codes
Hexadecimal value | Decimal value | Descriptions |
---|---|---|
0x0 | 0 | No logging. (This is the default) |
0x1 | 1 | Queries transactions |
0x10 | 16 | Notifications transactions |
0x20 | 32 | Updates transactions |
0xFE | 254 | Non-queries transactions |
0x100 | 256 | Question packets |
0x200 | 512 | Answer packets |
0x1000 | 4096 | Send packets |
0x2000 | 8192 | Receive packets |
0x4000 | 16384 | UDP packets |
0x8000 | 32768 | TCP packets |
0xFFFF | 65535 | All packets |
0x10000 | 65536 | AD write transactions |
0x20000 | 131072 | AD update transactions |
0x1000000 | 16777216 | Full packets |