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 well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Latest Contributions

Featured Links