Creating Resource Records using DNSCMD

by Mitch Tulloch [Published on 29 Oct. 2009 / Last Updated on 3 May 2009]

How to use the DNSCMD command to create a resource record from the command-line.

If your DNS server is running Windows Server Core, you can create resource records from the command-line by using the DNSCMD command. For example, to create a host (A) record in the on authoritative DNS server SEA-SC1 for a server named SEA-SRV8 that has IP address, do the following:

dnscmd SEA-SC1 /recordadd /aging /openacl A

Verify the result by listing all A records in the domain as follows:

dnscmd SEA-SC1 /enumrecords /type A

Returned records:

@ [Aging:3571189] 600 A

SEA-DESK155 [Aging:3571191] 1200 A

sea-sc1 [Aging:3571238] 3600 A

SEA-SC4 [Aging:3571189] 1200 A

SEA-SRV4 [Aging:3571192] 1200 A

SEA-SRV8 [Aging:3571246] 3600 A

The /aging switch in the previous command indicates that the new resource record can be aged and scavenged. If you omit this parameter, the
resource record remains in the DNS database until it is updated or removed manually. The /openacl switch indicates that any user can modify this
record. Without this parameter, only administrators can modify the record.

For more information on managing DNS servers running on Windows Server Core, see my book Windows Server 2008 Server Core Administrator's Pocket Consultant from Microsoft Press.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see .

Latest Contributions

Featured Links