• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3082
  • Last Modified:

Using DNSCMD to export reverse lookup zone

I am using the following command to export DNS Reverse lookup zone to a file.

C:\>dnscmd DNSSERVER /zoneexport 0.168.192.in-addr.arpa > c:\dnszones\0.168.192.in
-addr.arpa.dns

I do not get any error, but when I open up the exported file I see:

Usage: DnsCmd <ServerName> /ZoneExport <ZoneName> <ZoneExportFile>
    <ZoneName>   -- FQDN of zone to export
                    /Cache to export cache

Command failed:  ERROR_INVALID_PARAMETER     87  (00000057)

Check the required arguments and format of your command.



I wonder what I am typing wrong..

Any help will be very much appreciated

Thank you
0
jskfan
Asked:
jskfan
  • 7
  • 3
1 Solution
 
achaldaveCommented:
The command requires filename at the end. your command is missing file name.

dnscmd DNSSERVER /zoneexport 0.168.192.in-addr.arpa 0.168.192.in
-addr.arpa.dns
0
 
jskfanAuthor Commented:
do you mean seatination file name? if so it is the .dns file
c:\dnszones\0.168.192.in-addr.arpa.dns
0
 
jskfanAuthor Commented:
The zone I want to export is :
0.168.192.in-addr.arpa
0
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
jskfanAuthor Commented:
I am not sure what I typed wrong........
I did not have problem exporting forward lookup zones with DNSCMD
0
 
achaldaveCommented:
I meant output file name, yes destination file name, avoid using zonename.dns as output file name, the default path of the output file is %systemroot%/System32/Dns directory and that can create problem if you don't provide proper path.

dnscmd DNSSERVER /zoneexport 0.168.192.in-addr.arpa output.dns or


dnscmd DNSSERVER /zoneexport 0.168.192.in-addr.arpa C:\dnszones\outputfilename.dns
0
 
jskfanAuthor Commented:
I changed the filename and it is still doing the same thing
0
 
achaldaveCommented:
Is the zone name correct? The command should export the reverse lookup zone

http://dns-info.blogspot.com/2009/02/export-reverse-lookup-zone-using-dnscmd.html
0
 
jskfanAuthor Commented:
something weird...
I removed the DNSSERVERNAME from the command and it worked...
0
 
jskfanAuthor Commented:
This worked
dnscmd  /zoneexport 9.40.10.in-addr.arpa 9.40.10.in-addr.arpa.dns
0
 
jskfanAuthor Commented:
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now