1

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?

3 Answers3

2

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.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • 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 03 '12 at 09:42
  • Did you create Active Directory Integrated zones? Do you have "Hide Operating System Files" turned off in Windows Explorer, etc? – MDMarra Aug 03 '12 at 09: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 03 '12 at 09:55
  • 2
    Yes. It is an option. It's literally two radio buttons down from where you show hidden files. – MDMarra Aug 03 '12 at 09: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 03 '12 at 09:58
0

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.

dunxd
  • 9,482
  • 21
  • 80
  • 117
-4

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...

Dom
  • 6,628
  • 1
  • 19
  • 24