O'Reilly logo

Windows Server Cookbook by Robbie Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.11. Creating and Deleting Resource Records

Problem

You want to create or delete resource records.

Solution

Using a graphical user interface

  1. Open the DNS snap-in (dnsmgmt.msc).

  2. Connect to the DNS Server you want to modify. In the left pane, right-click on DNS and select Connect to DNS Server. Select The following computer and enter the target server name. Click OK.

  3. If you want to add or delete a record in a forward zone, expand the Forward Lookup Zone folder. If you want to add or delete a record for a reverse zone, expand the Reverse Lookup Zone folder.

To create a resource record, do the following:

  1. In the left pane, right-click the zone and select the option that corresponds to the record type you want to create—e.g., New Host (A).

  2. Fill in all required fields.

  3. Click OK.

To delete a resource record, do the following:

  1. In the left pane, click on the zone where the record is.

  2. In the right pane, right-click on the record you want to delete and select Delete.

  3. Click Yes to confirm.

Using a command-line interface

To add a resource record, use the following command:

> dnscmd <ServerName> /recordadd <ZoneName> 
                  <NodeName> 
                  <RecordType> 
                  <RRData>

The following example adds an A record in the rallencorp.com zone:

> dnscmd dc1 /recordadd rallencorp.com myhost01 A 19.25.52.25

To delete a resource record, use the following command:

> dnscmd <ServerName> /recorddelete <ZoneName> 
                  <NodeName> 
                  <RecordType> 
                  <RRData>

The following example deletes an A record in the rallencorp.com zone:

> dnscmd dns01 /recorddelete rallencorp.com ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required