13.6. Converting a Zone to an Active Directory-Integrated Zone

Problem

You want to convert a primary zone to an Active Directory-integrated zone. This causes the contents of the zone to be stored and replicated in Active Directory instead of in a text file, as is the case with a standard primary zone.

Solution

Using a graphical user interface

  1. From the Administrative Tools, 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 convert a forward zone, expand the Forward Lookup Zone folder. If you want to convert a reverse zone, expand the Reverse Lookup Zone folder.

  4. Click on the zone you want to convert, then right-click it, and select Properties.

  5. Beside Type, click the Change button.

  6. Check the box beside Store the zone in Active Directory.

  7. Click OK and click OK again.

Using a command-line interface

Use the following command to convert a standard primary zone to Active Directory-integrated:

> dnscmd <ServerName> /zoneresettype <ZoneName> /DsPrimary

For example:

> dnscmd dns02 /zoneresettype myzone.com /DsPrimary

Using VBScript

' This code converts a zone to AD-integrated.
' ------ SCRIPT CONFIGURATION ------
strZone   = "<ZoneName>"    ' e.g., rallencorp.com
strServer = "<ServerName>" ' e.g., dc1.rallencorp.com ' ------ END CONFIGURATION --------- set objDNS = GetObject("winMgmts:\\" & strServer & "\root\MicrosoftDNS") ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.