- Using LDIFDE to export the schema from the source forest
- Comparing schemas with the Active Directory DS/LDS Schema Analyzer
- Import your schema into the target forest
One of the biggest advantages of the process I've detailed in this article is that it is not exclusive to Active Directory schema management. This process can also be used to synchronize schemas between various combinations of Active Directory, ADAM (Active Directory Application Mode), and AD LDS directories. The schema synchronization can be performed to synchronize schemas between the following:
- Active Directory and Active Directory
- ADAM and ADAM
- AD LDS and AD LDS
- Active Directory and ADAM
- Active Directory and AD LDS
- AD LDS and ADAM
This process can also be used to compare schemas bet-ween various combinations of Active Directory, ADAM, and AD LDS directories. The schema comparison can be performed to compare schemas between the following:
- Active Directory and Active Directory
- ADAM and ADAM
- AD LDS and AD LDS
- Active Directory and ADAM
- Active Directory and AD LDS
- AD LDS and ADAM
- Active Directory and an LDIF file
- ADAM and an LDIF file
- AD LDS and an LDIF file
It is important to note that using this process to synchronize Active Directory schemas is not suited for all attributes and classes. In fact, there are known issues with the use of this process to extend the Active Directory schema, for Exchange Server. Using the procedures listed in this document for preparing your Active Directory schema for Exchange Server and it is not supported; you must run setup.exe /PrepareSchema from the Exchange Server setup directory to extend the schema for Exchange Server. Therefore, if your environment includes non-custom attributes and classes, you must first ensure that the use of this process is supported for those non-custom attributes and classes before you go ahead and use it to synchronize Active Directory schemas. Please note that the use of this process to export and compare schemas will not have an adverse effect on non-custom attributes or classes.
- Log on to a member server or a domain controller.
- Open a Command Prompt window.
- Type the following into the Command Prompt window:
ldifde -f PRODSchema.ldif -d CN=Schema,CN=Configuration,DC=WS08DOMAIN01,DC=local
- Press Enter.
- Log on to a member server or a domain controller that has AD LDS installed and belongs to a domain in the target forest.
- Find the PRODSchema.ldif file that was created in the previous section and copy it to the server you log on to.
- Go to Start, click Run, and type the following: C:\WINDOWS\ADAM\ADSchemaAnalyzer.exe
- Hit Enter and the AD DS/LDS Schema Analyzer will open.
- On the File menu of the AD DS/LDS Schema Analyzer window, click Load target schema.
- In the Load target schema window, shown in Figure 2, click the Load LDIF button.
- Browse to the location of the LDIF file and click Open.
- The LDIF file will be imported into the AD DS/LDS Schema Analyzer.
- On the File menu, click Load base schema.
- In the Load base schema window, enter a domain controller to connect to in the Server[:port] field, a username, a password, and a domain, as shown in Figure 3.
- Click Ok.
- To filter for the non-present elements, select Hide present elements from the Schema menu. The missing elements will be listed under the Attributes node, as shown in Figure 5.
- Expand the Attributes node and the present and non-present elements (attributes and classes) will be listed, by default. The attributes that are consistent between forests appear with a checkmark in the box beside the element name, as shown in Figure 4. The elements that exist in the source forest, but are missing from the target forest appear with an empty box.
- Domain-DNS
- DMD
- SAM-Domain
- If the target forest has an FFL of Windows Server 2008 or later, you can replace the offending SID with "RO".
- If the source forest has an FFL of Windows Server 2008 and the target forest has an FFL earlier than Windows Server 2008 (for example, Windows Server 2003), you need to replace the "RO" in the SDDL with the SID of the target forest's Enterprise Read-Only Domain Controllers security group.
- To include all missing elements in the LDIF file, on the Schema menu in the AD DS/LDS Schema Analyzer window, click Mark all non-present elements as included, and then click OK on the confirmation. To control which missing elements are included in the LDIF file, click the box beside each element you want to include. A plus (+) sign will be added beside the element, as shown in Figure 6.
- On the File menu in the AD DS/LDS Schema Analyzer, click Create LDIF file.
- In the Select LDIF file window, enter a location and filename for the LDIF file and click Save.
To import the Active Directory schema into the target forest, use an account that is a member of the Enterprise Admins and Schema Admins groups to perform the following tasks:
- Log on to the domain controller that holds the schema Master Operations Master role.
- Open a Command Prompt window.
- In the Command Prompt window, type the following:
ldifde -i -f MissingElements.ldf -c dc=X DC=WS08DOMAIN02,DC=net
- Hit Enter.
