Share via


Export and Re-import bulk PTR reverse lookup records

Question

Tuesday, October 21, 2014 7:46 AM

Hi,

If I were to export an existing zone let's say 0.168.192 which has hundreds of PTR records and I want to create new zones 1.168.192, 2.168.192, 3.168.192 and so on - what would be the best action of exporting this whole zone (0.168.192) and importing certain records from this zone into one of the new zones?

For example 0.168.192 around 200 PTR records to be exported and then these records to be imported into the new zone 1.168.192?

Would a CSV be achievable? And if so, what columns and command line I would have to run?

Many thanks.

All replies (3)

Wednesday, October 22, 2014 6:35 AM ✅Answered

Hi,

First, we can export the reverse zone by the command below,

dnscmd /ZoneExport FQDN_of_zonename Zone_export_file

Then we can create a new reverse zone with the exported file,

  1. Open DNS console
  2. Right click the Reverse Lookup Zones, click New
  3. Click Next thrice, input the name of the new zone
  4. Click Next, choose Use this existing file, then input the name of exported file
  5. Click Next twice then click Finish

Note: To use this existing file, ensure that it has been copied to the folder %SystemRoot%\system32\dns on this server, and then click Next.

Best Regards.

Steven Lee

TechNet Community Support


Tuesday, October 28, 2014 6:59 AM ✅Answered

Hi,

To export a DNS zone by Powershell, we can use the command "Export-DnsServerZone".

For detailed information, please refer to the link below,

Export-DnsServerZone

http://technet.microsoft.com/en-us/library/jj649939.aspx

Beside, here is a blog about how to copy and merge DNS zone with Powershell,

DNS Zone Copy and Merge with PowerShell

http://blogs.technet.com/b/ashleymcglone/archive/2014/07/31/dns-zone-copy-and-merge-with-powershell.aspx

If you have any further questions about Powershell, to get better help, please post the question on the forum below,

https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell

Best Regards.

Steven Lee

TechNet Community Support


Wednesday, October 22, 2014 11:17 AM

Thanks for that.

Is there any PowerShell commands that's probably more powerful to achieve my target? So when a zone is exported, certain PTR records in that exported zone to be imported to the new zone?

I tried to research and test via dnscmd but I think I'm limited to what I can do with this - so was wondering whether PowerShell scripting is better for me.

Thanks.