Exchange 2010, /PrepareSchema and a Cryptic Error

(note: TL;DR at the bottom in bold)

 

Its 11PM after a long day and I am here trying to rebuild my lab. I sit back, copy over the VHD templates for the VM I need (Exchange 2010 is what I was up too) and got all the prerequisites installed for Exchange 2010. I can get pretty lazy (remember this part, as this will bite me in the rear in a minute) and honestly I find PowerShell to be the lazy mans answer. I used the following to install the required prereqs for Exchange 2010 SP3 on Windows Server 2012 (works for 2012 R2)…

 

Add-WindowsFeature NET-Framework-Features,NET-HTTP-Activation,RPC-over-HTTP-proxy,RSAT-Clustering,Web-Mgmt-Console,WAS-Process-Model,Web-Asp-Net,Web-Basic-Auth,Web-Client-Auth,Web-Digest-Auth,Web-Dir-Browsing,Web-Dyn-Compression,Web-Http-Errors,Web-Http-Logging,Web-Http-Redirect,Web-Http-Tracing,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Lgcy-Mgmt-Console,Web-Metabase,Web-Net-Ext,Web-Request-Monitor,Web-Server,Web-Static-Content,Web-Windows-Auth,Web-WMI -Restart

Still awake? Good.. lets move on to the actual reason of me writing this..

So I am now at the point of preparing the schema and active directory. As a helpful reminder you will first prepare the schema and then active directory, which has not changed since Exchange 2007. You will also be required to use a user account that is in the following groups:

  • Schema Admins
  • Domain Admins
  • Enterprise Admins

A little piece of hidden advise for users who are doing this in a multi-site production / lab build, is that if you are preparing the schema or extending active directory the schema master FSMO role needs to be in the AD site you are actually preparing.

I download Exchange 2010 SP3 onto my brand new Server 2012 R2 machine which is domain joined, extract the package and run the “Setup.com /PrepareSchema” to get the following error thrown back in my face…

SchemaFailure

 

The snipplet is small due to the size of my monitor but you can click on it to expand it. The error code is also copied below..

 

The following error was generated when "$error.Clear(); install-ExchangeSchema -LdapFileName ($roleInstallPath + "Setup\Data\"+$RoleSchemaPrefix + "schema0.ldf")" was run: "The system could not find the file specific".

*sigh* .. Really? I went ahead and bing’ed and google’ed parts of these errors which came back with nothing. Great.. further examination of the logs (C:\ExchangeSetupLogs\) showed the following..

 

ExchangeSetup.log

[08/11/2014 02:59:42.0175] [1] Executing: 
    install-ExchangeSchema -LdapFileName ($roleInstallPath + "Setup\Data\"+$RoleSchemaPrefix + "schema0.ldf")


[08/11/2014 02:59:42.0175] [2] Active Directory session settings for 'Install-ExchangeSchema' are: View Entire Forest: 'True', Configuration Domain Controller: 'DC-01.extest.com', Preferred Global Catalog: 'DC-01.extest.com', Preferred Domain Controllers: '{ DC-01.extest.com }'
[08/11/2014 02:59:42.0175] [2] Beginning processing install-ExchangeSchema -LdapFileName:'Setup\Data\PostWindows2003_schema0.ldf'
[08/11/2014 02:59:42.0175] [2] Running <C:\Windows\system32\ldifde.exe> with arguments <-i -s "DC-01.extest.com" -f "C:\Windows\Temp\ExchangeSetup\Setup\Data\PostWindows2003_schema0.ldf" -j "C:\Users\administrator.EXTEST\AppData\Local\Temp\1" -c "<SchemaContainerDN>" "CN=Schema,CN=Configuration,DC=extest,DC=com">.
[08/11/2014 02:59:42.0175] [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: The system cannot find the file specified
[08/11/2014 02:59:42.0175] [2] [ERROR] The system cannot find the file specified

 

ExchangeSetupWatson.log

[08/11/2014 02:58:43.0366] [1] The following 1 error(s) occurred during task execution:
[08/11/2014 02:58:43.0366] [1] 0.  ErrorRecord: The system cannot find the file specified
[08/11/2014 02:58:43.0366] [1] 0.  ErrorRecord: System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Exchange.Management.Deployment.InstallExchangeSchema.RunProcess(String fileName, String arguments, WriteVerboseDelegate writeVerbose)
   at Microsoft.Exchange.Management.Deployment.InstallExchangeSchema.ImportSchemaFile(String schemaMasterServer, String schemaFilePath, String macroName, String macroValue, WriteVerboseDelegate writeVerbose)
   at Microsoft.Exchange.Management.Deployment.InstallExchangeSchema.InternalProcessRecord()
   at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()

 

Reading the error provided above was a bit much. I know its not permissions since I was using the “Administrator” account as its a brand new domain (as I just created it) and it could not be replication as its a single DC. I went back and then checked the actual prerequisite script I ran, and realized that it did not include the RSAT-ADDS toolset. Because these tools are not installed, and I am not preparing the schema on a domain controller (which has these tools installed by default) then the Exchange installation has no way to actually contact AD Schema to prepare it. Doh!

The simple solution here was to install the RSAT-ADDS module. The PowerShell command for each of these are below…

 

  • Server 2008 / 2008R2: ServerManagerCmd -i RSAT-ADDS
  • Server 2012 / 2012R2: Add-WindowsFeature RSAT-ADDS

 

Once this was done (no reboot is required) I reran the Setup.com /PrepareSchema and it worked without an issue:

 

PS working

 

I really wished there would be a normal error here, instead of outputting a bunch of nonsense that a normal admin, engineer or architect would not realize. Seeing something like that makes you think “oh man, there HAS to be permissions issues or something”, which there is not.. well at least not in this case.

 

Then again, I think MSFT read my mind as I purposely didn’t install the RSAT-ADDS module on my other Exchange server (which is now running Exchange 2013 CU5) and I got the following error:

 

Exchange 2013 error

 

At least they threw something non-cryptic in there :]

 

TL;DR: If you are preparing the schema or active directory on a server that is a non-domain controller, make sure you actually install the RSAT-ADDS module. Its required, and will throw a cool cryptic error at you if you don’t.

 

Hope this helps out more folks out there, and as always if you have any questions feel free to leave them in the comments below.

 

Cheers!

– Adam F