# DNS

#### Default location Windows 2003:&#x20;

`C:> %SystemRoot%\System32\Dns`&#x20;

#### Default location Windows 2008:&#x20;

`C:> %SystemRoot%\System32\Winevt\Logs\DNS Server.evtx`&#x20;

#### Default location of enhanced DNS Windows 2012 R2:&#x20;

`C:> %SystemRoot%\System32\Winevt\Logs\Microsoft Windows-DNSServer%4Analytical.etl`&#x20;

Ref. <https://technet.microsoft.com/en> us/library/cc940779.aspx&#x20;

#### Enable DNS Logging:&#x20;

`C:> DNSCmd /config /logLevel 0x8100F331`&#x20;

#### Set log location:&#x20;

`C:> DNSCmd /config /LogFilePath`&#x20;

#### Set size of log file:&#x20;

`C:> DNSCmd /config /logfilemaxsize 0xffffffff`
