Creating Resource Records using DNSCMD

  • Section(s): Active Directory, Admin, Network
  • Published on Oct 29, 2009.
  • Last Modified on May 03, 2009.
  • Last Modified by Mitch Tulloch.
  • Rated 5 out of 5 based on 1 votes.
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 fabrikam.com on authoritative DNS server SEA-SC1 for a server named SEA-SRV8 that has IP address 172.16.11.75, do the following:

dnscmd SEA-SC1 /recordadd fabrikam.com SEA-SRV8.fabrikam.com. /aging /openacl A 172.16.11.75

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

dnscmd SEA-SC1 /enumrecords fabrikam.com fabrikam.com. /type A

Returned records:

@ [Aging:3571189] 600 A 172.16.11.30

SEA-DESK155 [Aging:3571191] 1200 A      172.16.11.80

sea-sc1 [Aging:3571238] 3600 A  172.16.11.30

SEA-SC4 [Aging:3571189] 1200 A  172.16.11.33

SEA-SRV4 [Aging:3571192] 1200 A 172.16.11.81

SEA-SRV8 [Aging:3571246] 3600 A 172.16.11.75

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 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 www.mtit.com .


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred network administration tool?