2.9. Changing the Mode of a Domain

Problem

You want to change the mode of a Windows 2000 Active Directory domain from mixed to native. You typically want to do this as soon as possible after installing a Windows 2000 domain to take advantage of features that aren’t available with mixed-mode domains.

Solution

Using a graphical user interface

  1. Open the Active Directory Domains and Trusts snap-in.

  2. Browse to the domain you want to change in the left pane.

  3. Right-click on the domain and select Properties. The current mode will be listed in the Domain Operation Mode box.

  4. To change the mode, click the Change Mode button at the bottom.

Using a command-line interface

To retrieve the current mode, use the following command:

> dsquery * <DomainDN> -scope base -attr ntMixedDomain

Or you can use the enumprop command found in the Windows 2000 Resource Kit.

> enumprop /ATTR:ntMixedDomain "LDAP://<DomainDN>"

To change the mode to native, create an LDIF file called change_domain_mode.ldf with the following contents:

dn: <DomainDN>
changetype: modify
replace: ntMixedDomain
ntMixedDomain: 0
-

Then run the ldifde command to import the change.

> ldifde -i -f change_domain_mode.ldf

Using VBScript

' This code changes the mode of the specified domain to native
' ------ SCRIPT CONFIGURATION ------
strDomain = "<DomainDNSName>" ' e.g. amer.rallencorp.com ' ------ END CONFIGURATION --------- set objDomain = GetObject("LDAP://" & strDomain) if objDomain.Get("nTMixedDomain") > 0 Then Wscript.Echo "Changing mode to native . ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.