13.4.1 ProblemYou want to convert a primary zone to an AD-integrated zone. This causes the contents of the zone to be stored and replicated in Active Directory instead of in a text file. 13.4.2 Solution13.4.2.1 Using a graphical user interface
13.4.2.2 Using a command-line interface> dnscmd <ServerName> /zoneresettype <ZoneName> /DsPrimary 13.4.2.3 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") set objDNSServer = objDNS.Get("MicrosoftDNS_Server.Name="".""") set objDNSZone = objDNS.Get("MicrosoftDNS_Zone.ContainerName=""" & _ strZone & """,DnsServerName=""" & _ objDNSServer.Name & """,Name=""" & strZone & """") strNull = objDNSZone.ChangeZoneType(0, True) objDNSZone.Put_ WScript.Echo "Converted " & strZone & " to AD-Integrated" 13.4.3 DiscussionSee Introduction in Chapter 13 and Recipe 13.5 for more on AD-integrated zones. 13.4.4 See AlsoMS KB 198437 (How to Convert DNS Primary Server to Active Directory Integrated), MS KB 227844 (Primary and Active Directory Integrated Zones Differences), and MSDN: ChangeZoneType Method of the MicrosoftDNS_Zone Class |