This will cover how to export DNS records from a Windows Server that is resolving DNS queries for your environment.

This command can be run from a Powershell terminal on the Windows DNS server:

dnscmd [<servername>] /zoneexport <zonename> <zoneexportfile>

The arguments for the command are:

  • servername Specifies the DNS server to manage, represented by IP address, FQDN, or host name. If this parameter is omitted, the local server is used.
  • zonename Specifies the name of the zone.
  • zoneexportfile Specifies the name of the file to create.

There is also the offical documentation from Microsoft.

This command will generate a file that is named what you provided for zoneexportfile and it will be located in the %systemroot%/System32/Dns directory by defaullt.

DNS Discovery

Once you have a zonefile generated, you can continue with your discovery by following the DNS Discovery Guide.