Same as later versions of ADPRep.exe, the version of Adprep that comes with Windows Server 2003 R2 does a check for the current AD schema and parses through the list of intended schXX.ldf files that it wants to extend the schema with.
However, the adprep.exe version that comes with Windows Server 2003 R2 does not take into account that it is possible to defunct the schema attributes while later versions of Adprep account for this in the LDAP query that they make to get the current schema that they use for the test.
So… even if the admin has dutifully raised the Forest Functionality Level to Windows Server 2003 Native and then defuncted any of the attributes that the initial ADPrep run complains about it will not allow the W2k3 R2 version of ADPrep to complete.
One of the changes in later versions of Adprep is that the LDAP query to the schema contains an LDAP filter that simply filters out anything that has isDefunct=TRUE from the export. The tests it runs is then made on an export of the schema minus objects that have been defuncted.
To simulate this you can obtain the original schchk.vbs script that was used to test the schema upgrade in W2k3 RTM and then run the following to do the same filtered LDIFDE export that Adprep post-W2k3R2 does:
Ldifde –f schema.ldf –d “<DN of Schema>” –r (!(isDefunct=*))
Ldifde –f schema-defuncted.ldf –d “<DN of Schema>” –r (isDefunct=*)
This produces two exports of the AD schema; one that contains only defuncted objects and one that only contains objects that haven’t been defuncted.
If you still have the old schchk.vbs file lying around somwehere (it is no longer available for download) then you could potentially run schchk.vbs schema.ldf <schXX.ldf> to test the specific schema import file against your current schema (minus the defuncted bits).
At any rate… once you’ve manually done the checking and have determined that no conflicts exist, you can run adprep /forestprep /nosyntaxcheck to force Adprep to do the actual import without first doing the check.
Note: If you’re upgrading to Windows Server 2008 or Windows Server 2008 R2 then Adprep.exe is already doing this filtering so this is really only applicable to upgrading from W2k3 to W2k3 R2.
If you're upgrading from W2k3 to W2k3 R2 and you're seeing this issue you should also make sure you're using the W2k3 R2 SP2 version of ADPREP.exe that has a build number of 5.2.3790.3959 - not the SP1 build of Adprep.exe that came with the oriiginal W2k3 R2 SP1 CD's that has a build number of 5.2.3790.2075 (the 5.2.3790.2075 version of Adprep doesn't recognize the /nosyntaxcheck option).