Creating Resource Records using DNSCMD

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.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top