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 have windows 2008 R2 and i have created 20 .com primary and secondary zones for the domains. Within each of these are MX, A, SOA and NS records.

I have done this manually and its taking me ages using the GUI Wizard.

I have the exact same to do with .eu domains.

Where are the .DNS files located? What is the fastest way to create these zones?

share|improve this question
I feel your pain. – Tibor Aug 3 '12 at 9:34
Its a nightmare and RSI is getting worse! – SOLDIER-OF-FORTUNE Aug 3 '12 at 9:43

You can script zone and resource record creation/modification with dnscmd.

If you want to just get down with a text editor, you can edit the zone files in %systemroot%\System32\DNS.

share|improve this answer
well the zones i have created are not even located in System32\DNS - My intention was to copy the files and then edit them – SOLDIER-OF-FORTUNE Aug 3 '12 at 9:42
Did you create Active Directory Integrated zones? Do you have "Hide Operating System Files" turned off in Windows Explorer, etc? – MDMarra Aug 3 '12 at 9:47
primary and secondary zones for web domains. i have set the folder to display all hidden files. "Hide Operating System Files" ?? is that even an option? – SOLDIER-OF-FORTUNE Aug 3 '12 at 9:55
Yes. It is an option. It's literally two radio buttons down from where you show hidden files. – MDMarra Aug 3 '12 at 9:57
i can see other .dns files... but not the new ones that were created. i have Hide OS sys files uncheckedt too. – SOLDIER-OF-FORTUNE Aug 3 '12 at 9:58

Powershell can be used to manage DNS, via WMI (in which case you could also use VBScript if that is your bag).

Microsoft Scripting Guy blog has a detailed entry on this. It includes an annotated script example that can be used for exactly what you describe.

share|improve this answer

If your DNS server software is not your friend, kick it out (if you can) and use an other one. I just see bind is working on Windows. I know bind is configured by files, with a text editor. So remove Windows DNS and put an other ! Or install a small Linux/BSD server with bind on a VM... If all zones are the same (except the domain name), you will be able to have the same file for all zones...

share|improve this answer
i am not a 1 man army... i cant go changing the infrastructure to a companys dns server. But thanks for the reply. – SOLDIER-OF-FORTUNE Aug 3 '12 at 10:58
This is unnecessary, since Windows' DNS server is very scriptable using dnscmd.exe – ThatGraemeGuy Aug 3 '12 at 11:14
Q: "How do I do _____ with $product?" - A: "Use $product2 instead, of course!" – MDMarra Aug 3 '12 at 12:24

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.