Recipe 15.5. Raising the Functional LevelProblemYou want to raise the functional level of a Windows Server 2003 domain or forest. You should raise the functional level of a domain as soon as possible after installing a new Windows Server 2003 domain or upgrading from Windows 2000 to take advantage of the new features and enhancements. Once all the domains in a forest are at the Windows Server 2003 functional level, you can raise the forest functional level. SolutionDo the following to raise the functional level of a domain: Using a graphical user interface
Using a command-line interfaceTo retrieve the current functional level of a domain, use the following command: > dsquery * <DomainDN> -scope base -attr msDS-Behavior-Version Or use the enumprop command found in the Windows 2000 Resource Kit: > enumprop /ATTR:msDS-Behavior-Version "LDAP://<DomainDN>" To change the functional level to Windows Server 2003, create an LDIF file called raise_domain_func_level.ldf with the following contents: dn: <DomainDN> changetype: modify replace: msDS-Behavior-Version msDS-Behavior-Version: 2 - Next, run the ldifde command to import the change: > ldifde -i -f raise_domain_func_level.ldf Using VBScript' This code changes the functional level of the specified domain to ' the Windows Server 2003 domain functional level ' ------ SCRIPT CONFIGURATION ------ strDomain = "<DomainDNSName>" ' e.g., amer.rallencorp.com ' ------ END CONFIGURATION --------- set objDomain = GetObject("LDAP://" & strDomain) objDomain.GetInfo if objDomain.Get("msDS-Behavior-Version") <> 2 then Wscript.Echo "Changing domain to Windows Server 2003 functional level..." objDomain.Put "msDS-Behavior-Version", 2 objDomain.SetInfo else Wscript.Echo "Domain already at Windows Server 2003 functional level " end if Do the following to raise the functional level of a forest: Using a graphical user interface
Using a command-line interfaceTo retrieve the current forest functional level, use the following command: > dsquery * <ForestRootDN> -scope base -attr msDS-Behavior-Version Or use the enumprop command found in the Windows 2000 Resource Kit: > enumprop /ATTR:msDS-Behavior-Version "LDAP://<ForestRootDN>" To change the functional level to Windows Server 2003, create an LDIF file called raise_forest_func_level.ldf with the following contents: dn: cn=partitions,cn=configuration,<ForestRootDN> changetype: modify replace: msDS-Behavior-Version msDS-Behavior-Version: 2 - Next, run the ldifde command to import the change: > ldifde -i -f raise_forest_func_level.ldf Using VBScript' This code changes the functional level of the forest the ' user running the script is logged into to Windows Server 2003. set objRootDSE = GetObject("LDAP://RootDSE") set objDomain = GetObject("LDAP://cn=partitions," & _ objRootDSE.Get("configurationNamingContext") ) if objDomain.Get("msDS-Behavior-Version") <> 2 then Wscript.Echo "Attempting to change forest to " & _ "Windows Server 2003 functional level..." objDomain.Put "msDS-Behavior-Version", 2 objDomain.SetInfo else Wscript.Echo "Forest already at Windows Server 2003 functional level" end if DiscussionIn Windows Server 2003 Active Directory, functional levels have replaced the domain mode that was used in Windows 2000 to signify what operating systems are allowed to run on the domain controllers in the domain. With Windows Server 2003, there are functional levels for both domains and forests, whereas with Windows 2000 the domain mode applied only to domains. But just as with domain modes, changing a functional level is a one-way operation. After you make the change, there is no reverting back (i.e., unless you restore the entire domain or forest). The msDS-Behavior-Version attribute of the domainDNS object (e.g., dc=amer,dc=ral-lencorp,dc=com) holds the current domain functional level. Table 15-1 shows the three functional levels, their associated msDS-Behavior-Version values, and the operating systems that can be used on each's domain controllers.
When a domain is at the Windows 2000 functional level, the domain can be in mixed mode or native mode. Various new features of Windows Server 2003 Active Directory are enabled with each domain functional level. See Chapter 1 of Active Directory (O'Reilly) for more details. The value contained in msDS-Behavior-Version is mirrored in the domainFunctionality attribute of the RootDSE. That means you can perform anonymous queries against the RootDSE of a domain to quickly determine its current functional level.
Windows Server 2003 forest functional levels are very similar to domain functional levels. In fact, Table 15-1 also applies to forest functional levels, except that the list of available operating systems applies to all domain controllers in the forest, not just a single domain. So even if just one of the domains in the forest is at the Windows 2000 domain functional level, you cannot raise the forest above the Windows 2000 forest functional level. If you attempt to do so, you will receive an error that the operation cannot be completed. After you raise the last Windows 2000 domain functional level to Windows Server 2003, you can then raise the forest functional level. You may wonder why there is a need to differentiate between forest and domain functional levels. The primary reason is new features. Some new Windows Server 2003 Active Directory features require all domain controllers in the forest to run Windows Server 2003. To ensure all domain controllers are running a certain operating system throughout a forest, Microsoft had to apply the functional level concept to forests as well as domains. For more information on the new features that are available with each functional level, see Chapter 1 of Active Directory (O'Reilly). The forest functional level is stored in the msDS-Behavior-Version attribute of the Partitions container in the Configuration NC. For example, in the rallencorp.com forest it would be stored in cn=partitions,cn=configuration,dc=rallencorp,dc=com. The value contained in msDS-Behavior-Version is mirrored to the forestFunctionality attribute of the RootDSE, which means you can find the functional level of the forest by querying the RootDSE. See AlsoChapter 1 of Active Directory (O'Reilly), Recipe 15.14, and MS KB 322692 (HOW TO: Raise the Domain Functional Level in Windows Server 2003) |