dns.exe is used to manage DNS zone on domains and domain aliases. This utility will help to perform the tasks like enabling/disabling  a local DNS service on a domain or domain alias, adding/deleting resource records to form/ a domain’s or domain alias DNS zone, assigning external master DNS servers for a DNS zone and also updates the start-of-Authority (SOA) record for a DNS zone.

Example:

The below example removes all pre-existing resource records from the DNS zone on the domain testdomain.com and also adds the following two records to the DNS.

  • New MX resource record mail3.testdomain.com specifying domain name mail.textdomain.com as the mail exchanger and settings the mail exchanger’s priority to 10
  • New  NS resource record ns2.testdomain.com setting domain ns.testdomain as the name server
ns.exe --set testdomain.com -list "MX,mail3,mail.testdomain.com,10;NS,ns2,ns.testdomain.com"

Commands:

-a or --add with parameter <domain name>|<domain alias> adds a resource record to a domain;s DNS Zone. If a record already exists, the command returns code 2.

-s or --set with parameter <domain name>|<domain alias> adds a specific resource record and removes all pre-existing resource record from a domain DNS zone.

-d or --del with parameter <domain name>|<domain alias> deletes a resource record from a domain DNS zone.

-da or --del-all with parameter <domain name>|<domain alias> deletes all resource records from a domain DNS zone.

--on with parameter <domain name>|<domain alias> enables DNS service on a domain or domain alias.

-off with parameter <domain name>|<domain alias> disables DNS service on a domain or domain alias.

--update-soa with parameter <domain name>|<domain alias> updates SOA record settings for a domain or domain alias.

--info with parameter <domain>|<domain alias> displays the list of resource records for a domain or domain alias.

--help or -h displays the help on the use of the utility.

Options:

Some of the options used in dns.exe utility are as follows

-ip specifies an IP address for creating A type resource record in a domain DNS zone.

-ns specifies the NS record for a domain DNS zone and it can be added or deleted with –add and –del commands.

-mx specifies the MX record for a domain DNS zone and it can be added or deleted with –add and –del commands.

-cname specifies the CNAME record for a domain DNS zone.

-mailexchanger specifies the mail exchanger for creating MX type in DNS zone.

-ptr specifies the PTR record in a domain DNS zone.

 

 

 

 

 

 

 

Categorized in:

Tagged in:

,