The Microsoft DNS Server provided certain server level statistics which enabled an admin to track the usage pattern or monitor DNS server performance. The statistics provided includes server wide query statistics, zone transfer statistics, packet statistics, different record statistics, DNSSEC statistics etc. ( For more details on DNS Server level statistics see http://technet.microsoft.com/en-us/library/jj649858.aspx )

In Windows Server 2012 R2, zone level statistics have been introduced which can be used to provide a more granular insight into the DNS server usage pattern for each authoritative zone hosted on the server. These granular stats can be used to audit the usage, used to bill customers in a shared DNS service scenario, generate statistical reports or monitor performance of a particular zone. The administrator can now get the following stats on every authoritative zone the server hosts:

· Zone Query Statistics

· Zone Transfer Statistics

· Zone Update Statistics

To get the complete zone level statistics the admin needs to call the Get-DnsServerStatistics with a ZoneName option

$statistics = Get-DnsServerStatistics -ZoneName contoso.com

The administrator can reset the current zone level statistics counter using

Clear-DnsServerStatistics -ZoneName contoso.com

Zone Query Statistics

The zone query statistics provide the following information

QueriesReceived- the number of queries received,

QueriesResponded- the number of queries responded successfully (with a valid DNS response),

QueriesFailure- the number of queries not responded successfully i.e. resulting in DNS SERVER FAILURE and

QueriesNameError- the number of queries responded with an NXDOMAIN or EMPTY AUTH response,

The above stats are provided for each record type:

A, AAAA, PTR, CNAME, MX, AFSDB, ATMA, DHCID, DNAME, HINFO, ISDN, MG (Mail Group), MB (Mail Box), MINFO (Mail Box Information), NAPTR (Naming Authority Pointer), NXT (Next Domain), KEY (Public Key), MR (Renamed Mailbox), RP (Responsible Person), RT (Route Through), SRV (Service Location), SIG (Signature), TXT (Text), WKS (Well Known Services), X.25,DNSKEY, DS, NS, SOA

To get the zone level query statistics use the following PowerShell cmdlet

$statistics = Get-DnsServerStatistics –ZoneName contoso.com

$statistics.ZoneQueryStatistics

Zone Transfer Statistics

The zone query statistics provide the information about the zone transfer transactions for both AXFR and IXFR transactions.

RequestReceived- The total number of zone transfer requests received by the DNS Server service when operating as a primary server for a specific zone.

RequestSent- The total number of zone transfer requests sent by the DNS Server service when operating as a secondary server for a specific zone.,

ResponseReceived- The total number of zone transfer requests received by the DNS Server service when operating as a secondary server for a specific zone.

SuccessReceived- The total number of zone transfers received by the DNS Server service when operating as a secondary server for a specific zone,

SuccessSent- The total number of zone transfers successfully sent by the DNS Server service when operating as a master server for a specific zone.

To get the zone level Transfer statistics use

$statistics = Get-DnsServerStatistics –ZoneName contoso.com

$statistics.ZoneTransferStatistics

Zone Update Statistics

The zone query statistics provide the information about the zone dynamic updates transactions viz.

DynamicUpdateReceived- The total number of dynamic update requests received by the DNS server.

DynamicUpdateRejected- The total number of dynamic updates rejected by the DNS server.

To get the zone level dynamic update statistics use

$statistics = Get-DnsServerStatistics –ZoneName contoso.com

$statistics.ZoneUpdateStatistics