Showing posts with label DNS CMD. Show all posts
Showing posts with label DNS CMD. Show all posts

Wednesday, February 25, 2009

Export reverse lookup zone using dnscmd

Do the following to export reverse lookup zone on command line. 1. Assume the primary dns server for the dns (domain controller) is "dnsserver2003" and the reverselookupzone file to be created is "reverselookupzone.dns"
2. Now run the below command to export reverselookup zone on command prompt.

dnscmd dnsserver2003 /zoneexport 1.168.192.in-addr.arpa reverselookupzone.dns.

Output: DNS Server . exported zone 1.168.192.in-addr.arpa to file C:\WINDOWS\system32\dns\reverselookupzone.dns Command completed successfully.


3. To export the zone from current cache, then run
dnscmd /zoneexport 1.168.192.in-addr.arpa /cache

output:DNS Server . exported zone
1.168.192.in-addr.arpa to file C:\WINDOWS\system32\dns\/cache
Command completed successfully.

Tuesday, February 24, 2009

reload reverse lookup zone using dnscmd

To reload reverselookup zone on command line using dnscmd command, follow the instructions below.

1. Assume the dns server on which to reload the zone is "dnsserver2003" and reverselookup zone name is "1.168.192.in-addr.arpa".
2. Now run the below command to update the reverse lookupzone.
dnscmd dnsserver2003 /zonereload 1.168.192.in-addr.arpa

Tuesday, February 17, 2009

Create Host A record using dnscmd

The following shows adding a host A record on command prompt.

1. assume the dns server is "dnsserver", dns zone is "myrootdns.com" and host which is to be added is "dnsclient.myrootdns.com"

dnscmd dnsserver /recordadd myrootdns.com . /Aging /OpenAcl A dnsclient.myrootdns.com

To set timeout (say 20secs) for the record, run

dnscmd dnsserver /recordadd myrootdns.com . /Aging /OpenAcl 20 A dnsclient.myrootdns.com

Sunday, February 15, 2009

Create MR Record using dnscmd

The following illustrates on how to create MailBox Renamed record on command prompt using the command dnscmd.exe.
1. Asssume the dns zone is "myrootdns.com" and host name of the existing mailbox record is "dnsserver.myrootdns.com".
2. Now the command below to add MR record,
dnscmd dnsserver /recordadd myrootdns.com . /Aging /OpenAcl MR dnsserver.myrootdns.com
3. Verify the MR record created in dns manager snapin dialog.

Delete Host A record using dnscmd

To remove host Type A record on command prompt, do the following

1. Assume the dns domain is "myrootdns.com", dns server for the domain is "dnsserver", Host name for which the Type A record to be deleted is "dnsclient".

dnscmd dnsserver /recorddelete myrootdns.com dnsclient A /f




Create MG Record using dnscmd

To add MailGroup(MG) record on command prompt, do the following.
1. Assume the domain zone in which the MG record to be created is "myrootdns.com", dns server for the domain is "dnsserver", and assume mailbox(MB) record to be added is at host "dnsserver.myrootdns.com"

2. Now run the command below to add the MG resource record at
dnscmd dnsserver /recordadd myrootdns.com . /Aging /OpenAcl MG dnsserver.myrootdns.com


Create MailBox(MB) record using dnscmd

To add a MB record through command prompt, do the following

1. Assume the domain for which mailbox need to be created is "myrootdns.com", and host which will host the mailbox is "dnsserver.myrootdns.com".
2. Now run the below command to create MB record.
dnscmd dnsserver /recordadd myrootdns.com dnsserver /Aging /OpenAcl MB dnsserver.myrootdns.com

Saturday, February 14, 2009

Delete MX Record Using dnscmd

Do the following command to delete a MX record on command prompt,
1. Assume the dns zone is myrootdns.com, dns server is "dnsserver", mail server node is "mailserver"

dnscmd dnsserver /recorddelete myrootdns.com mailserver MX /f

Create MX Record using dnscmd

The following illustrates on how to add mx record on command prompt using dnscmd
1. Assume the dns server "dnsserver", dns zone name is "myrootdns.com" and mail server is mailserver.myrootdns.com

dnscmd dnsserver /recordadd myrootdns.com mailserver /Aging /OpenAcl MX 10 mailserver.myrootdns.com

Create NS Record using dnscmd

The following illustrates on how to add NS (Name Server) to a dns on command prompt.

1. Assume the subdomain is "subdomain.myrootdns.com", parent domain is "myrootdns.com", parent domain's dns server is "dnsserver", the name server (dns server) for subdomain.myrootdns.com is "childdnsserver.myrootdns.com" .
2. Now run the below command to add NS for "childdnsserver" at "myrootdns.com" dns zone.

dnscmd dnsserver /recordadd myrootdns.com subdomain /Aging /OpenAcl NS childdnsserver.myrootdns.com




To set timeout(20) for the record, run

dnscmd dnsserver /recordadd myrootdns.com subdomain /Aging /OpenAcl 20 NS childdnsserver.myrootdns.com

To remove NS reocord, run

dnscmd dnsserver /recorddelete myrootdns.com dnsserver NS childdnsserver.myrootdns.com

Create Host AAAA record using dnscmd

The following shows on how to add Type AAAA resource record to a dns through command prompt.

1. Assume the domain name is "myrootdns.com", dns server is "dnsserver", Host name of the machine for which to add AAAA record is "dnsserver" and IPv6 address of dnsserver is "fe80::212:79ff:fedb:e69"/

dnscmd dnsserver /recordadd myrootdns.com dnsserver.myrootdns.com /Aging /OpenAcl AAAA fe80::212:79ff:fedb:e69

To set timeout(20 secs) for AAAA record, run

dnscmd dnsserver /recordadd myrootdns.com dnsserver.myrootdns.com /Aging /OpenAcl 20 AAAA fe80::212:79ff:fedb:e69

Create Host Type A record using dnscmd

The following illustrates on how to add Type A resource records on command prompt using dnscmd.

1. Assume the domain name is "myrootdns.com", dns server is "dnsserver", client Machine for which to add Host A record is "dnsclient.myrootdns.com" and IP address of dnsclient.myrootdns.com is "192.168.1.200".
2. Run below command to add Type A record to "dnsserver"

dnscmd dnsserver myrootdns.com dnsclient.myrootdns.com /Aging /OpenAcl A 192.168.1.200
3. To verify the record is created, run

dnscmd dnsserver /EnumRecords myrootdns.com dnsclient.myrootdns.com

To set timeout for the record, run

dnscmd dnsserver myrootdns.com dnsclient.myrootdns.com /Aging /OpenAcl 20 A 192.168.1.200

Friday, February 13, 2009

ZoneresetScavengeservers using dnscmd

To set Scavenging servers for a zone on command prompt, do the following
1. Assume the dns server is "dnsserver" and zone is "myrootdns.com" and scavenging server ip address is 192.168.1.100.
dnscmd dnsserver /zoneresetscavengeservers myrootdns.com 192.168.1.100

ZoneResetSecondaries using dnscmd

To set secondary server ip addresses with zone transfer options, do the following.
1. Assume the dns server is "dnsserver", zone name is "myrootdns.com" seconday server ip address is "192.168.1.200"

2. To allow zone transfered to only to the list of secondary servers, run
dnscmd dnsserver /zoneresetsecondaries myrootdns.com /securelist 192.168.1.200.



3. To allow zone trasfers to all secondaries, run

dnscmd dnsserver /zoneresetsecondaries myrootdns.com /nonsecure

4. To disallow zone transgers to secondaries, run

dnscmd dnsserver /zoneresetsecondaries /noxfr

5. To notify secondaries about the change in secondary settings, run

dnscmd dnsserver /zoneresetsecondaries /noxfr /notify

6. To disllow notifieing, run

dnscmd dnsserver /zoneresetsecondaries /noxfr /nonotify

7. To allow notify only to the list of ip addresses, run

dnscmd dnsserver /zoneresetsecondaries /noxfr /notifylist 192.168.1.200

Change zone type using dnscmd

To reset a zone type on command prompt, do the following

1. Assume the server name is dnsserver and zone name is myrootdns.com.

2. To reset zone from ds type to primary, run

dnscmd dnsserver /zoneresettype myrootdns.com /primary /file myrootdns.dns


3. To change type from primary to ds, run

dnscmd dnsserver /zoneresettype myrootdns.com /ds

Display All records in a zone using dnscmd

To print all the resource records in a zone on command promt, do the following
1. Assume the dns server is "dnsserver" and dns zone is "myrootdns.com".


zonewriteback using dnscmd

To write back a zone to file on command prompt, do the following

1. Assume the dns server name is "dnsserver", zone which is to be written back is "
"myrootdns.com".

dnscmd dnsserver /zonewriteback myrootdns.com


Set ZoneUpdateFromDs using dnscmd

The following shows on how to update zone from DS on command prompt

1. Assume the dns server is "dnsserver", and zone name is "myrootdns.com".

2. Run the below command to update zone

dnscmd dnsserver /zoneupdatefromds myrootdns.com


zone wirteback using dnscmd

To write a zone to file or database through command line, do the following
1. Assume the dns server is "dnsserver", zone which is to be written back to file is "myrootdns.com"

dnscmd dnsserver /zonewriteback myrootdns.com

NodeDelete using dnscmd

To remove all resource records from a host on command line using dnscmd, do the following.

1. Assume the dns server is "dnsserver", zone name is "myrootdns.com" and node name is "subdnsserver".

run the following to delete all resource records
dnscmd dnsserver /nodedelete myrootdns.com subdnsserver.myrootdns.com /f



2. If the node to be delete is "subdomain", then the entire tree of records to be deleted

dnscmd dnsserver /nodedelete myrootdns.com subdnsserver.myrootdns.com /tree /f

Design by infinityskins.blogspot