KnowledgeBase: "The system cannot find the file specified" Adprep /gpprep error, or tool crashes
Microsoft Knowledgebase article 2743345 with title "The system cannot find the file specified" Adprep /gpprep error, or tool crashes" describes an issue where the Group Policy Preparation fails or crashes.
The main reason for this behavior is the Domain Controller holding the Infrastructure Master Flexible Single Master Operations (FSMO) role in this domain implements a disjoint namespace. Adprep.exe assumes that computer names will match their domain names because this match is the default behavior in all versions of Windows.
About Disjoint Namespaces
A disjoint namespace scenario is one in which the primary DNS suffix of a computer does not match the DNS domain name where that computer resides. The computer with the primary DNS suffix that does not match is said to be disjoint. Another disjoint namespace scenario occurs if the NetBIOS domain name of a domain controller does not match the DNS domain name.
Disjoint namespaces are not a Microsoft best practice.
About manual Group Policy Preparation
As written before, a couple of scenarios exist where you need to perform Group Policy Preparation separately on the commandline, despite the new automatic Active Directory Upgrade process in Windows Server 2012’s Active Directory Domain Services Configuration Wizard and Install-ADDSDomainController Cmdlet:
You run adprep.exe /domainprep /gpprep from the \support\adprep folder of the Windows Server 2012 Installation Media in an Active Directory domain where the Domain Controller holding the Infrastructure Master Flexible Single Master Operations (FSMO) role implements a disjoint namespace.
You encounter error code 0x2.
Perform the following steps to successfully prepare Group Policy in this situation:
Perform these steps with an account that is a member of the Domain Admins group. Also, run commands at an elevated command prompt.
- Locate the infrastructure master role holder in the domain. To do this, run the following command:
netdom.exe query fsmo
- Log on to the console of the Domain Controller holding the Infrastructure Master Flexible Single Master Operations (FSMO) with an account that is a member of the Domain Admins group.
- Disable incoming and outgoing (also known as "inbound and outbound") replication. To do this, run the following command:
repadmin.exe /options localhost
- Then modify its Domain Name System (DNS) suffix. To do this, follow these steps:
- Start sysdm.cpl, click OK, click Change, and then click More
- Set the suffix in the Primary DNS suffix of this computer box to match the Active Directory Domain Services domain name instead of the current disjointed name.
- Restart and log on to the server again to run the following command:
adprep.exe /domainprep /gpprep
- Use sysdm.cpl, and then follow the steps in step 3, except this time in step 3.2, you must set the suffix in the Primary DNS suffix of this computer box to match the original disjoint name on the infrastructure master server.
- Restart and then log on to the infrastructure master server, and re-enable inbound and outbound replication. To do this, use the following command:
repadmin.exe /options localhost
While this KnowledgeBase article implements a quick fix to resolve the specific Group Policy Preparation problem, the real problem lies in a DNS configuration, that is not a best practice. In the future, the disjoint namespace will contribute to numerous other problems, so if you can eliminate this situation on the longer term, this will help you avoid more errors.
Related KnowledgeBase articles
2743345 The system cannot find the file specified" Adprep /gpprep error, or tool crashes
New features in ADDS in Windows Server 2012, Part 3: New Upgrade Process
Adprep "not a valid Win32 application" error on Windows Server 2003, 64-bit version
Group Policy preparation is not performed when you automatically prepare an existing domain for Windows Server 2012
Understanding Disjoint Namespace Scenarios
Kerberos and the Disjoint Namespace