InfotechGuyz.com Blog

How manage Server 2008 DNS from command line using dnscmd.exe

Dnscmd.exe can be found in Support\Tools directory on the Windows Server 2008 CD. You can copy dnscmd from support.cab to any location you wish.

Add a new standard zone called infotechguyz.com
dnscmd dc01.infotechguyz.local /ZoneAdd infotechguyz.com /Primary /file
infotechguyz.com.dns

Create a new A record for Server name EX01 with an IP of 10.1.0.50
Dnscmd dc01.infotechguyz.local /RecordAdd infotechguyz.com EX01 A 10.1.0.50

Enumerate all zones
Dnscmd dc01.infotechguyz.local /enumzones

Clear the Cache on the server
Dnscmd dc01.infotechguyz.local /clearcache

Restart DNS service
Dnscmd dc01.infotechguyz.local /restart