05/03/2012

Add DNS records from the commandline

Dnscmd is a command-line interface for managing DNS servers. You can use this tool to script DNS configuration and management tasks.
 

To add an A record to an existing zone on your DNS server:
 

Syntax:
Dnscmd server_name /RecordAdd zone_name computer_name A IP_address
 

Example:
This will create an A record for sales.contoso.com with the IP address of 192.168.140 in the contoso.com zone on srv1.contoso.com
Dnscmd srv1 /recordadd contoso.com sales A 192.168.140


Forcing zone replication:
Dnscmd server_name /ZoneRefresh zone_name




No comments: