Friday, May 31, 2013

DNSCMD Examples

Any of these commands can be combined and put in batch file or run separately.  Take note that they need to be run in a certain order if setting up from scratch.  The order would be zones and then records in the zone.  Note the parameter flags are case sensitive (ZoneAdd not zoneadd).

Records can be deleted instead of added by replacing Add with Delete, example /ZoneDelete

Add a zone:

dnscmd /ZoneAdd rasky.com /DSPrimary /DP /forest

Add an A record:

dnscmd /RecordAdd rasky.com test A 10.200.122.139
dnscmd /RecordAdd rasky.com @ A 10.200.122.140 (parent record)

Add a CNAME (alias):

dnscmd /RecordAdd rasky.com aliasname CNAME realname.rasky.com

No comments:

Post a Comment