Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'll need to count all the records in a dns server 2008, for all the zones configured on the server, by running a script locally

Thanks, aca

share|improve this question
Which is it? Windows Server 2003 or Windows Server 2008 Core? – jimbobmcgee Jan 17 '13 at 11:53

you can use dig to achieve this but you must allow zone tranfers on the dns server for the ip address of the machine where you run dig.

have a look at:

share|improve this answer

Running locally on the machine, this Powershell one-liner might do the trick:

(Get-WmiObject -Namespace "root\MicrosoftDNS" -Class "MicrosoftDNS_ResourceRecord").Count

...although it will probably include all the root hints, AD-specific entries and cached lookups, too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.