I would love to share about one more adventure I recently had with one of my clients' messaging platforms. I needed to install additional CAS/HUB servers in order to support hybrid deployment with Office 365 and further migration into the cloud.
What can be simpler that that. I have got 3 VMs running Windows 2008 R2 on which I have installed all the prereqs as listed here.
However, when running step of installing and configuring multi-role server my installation would stumble and fail at the point of installing Exchange management tools. with the error as below:
Exchange Management Tools FAILED
The following error was generated when "$error.Clear(); Set-WERRegistryMarkers; " was run: "Provisioning layer initialization failed: '"Scripting Agent initialization failed: "File is not found: 'c:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml'.""'".
The investigation lead me that the cause of the problem is Cmdlet Extension Agents which requires ScriptingAgentConfig.xml to be present on a server. And since it's a brand new server of course this file is not there.
As a result some of Exchange files are installed on the affected server, however server roles are not configured and no changes in Active Directory are done.
To resolve this problem first you will need to run on one of the Exchange 2010 servers in your organization the following command:
Disable-CmdletExtensionAgent -Identity "Scripting Agent"
This will temporarily disable you from running modified or extended Exchange 2010 cmdlets, but it will allow you to successfully complete Exchange 2010 installation.
After disabling Scripting Agent you can re-run Exchange 2010 installation.
Optionally, you can uninstall failed Exchange 2010 installation as did because I prefer nice and clean installations. In my case I had to run installation couple times as one of uninstallations failed with the error like this one (which is result of a lame installation):
This uninstallation simply removes the files installed earlier.
After that you can run Exchange installation again using your favorite installation method. Just in case details about Exchange installation can be found here for 2013 and here for 2010.
In my case I ran setup.com /m:Install /r:CA,HT /InstallWindowsComponents to install Exchange 2010 CAS/HUB server with Windows prereqs and installation went successfully.
After the installation is over you will need to rename file named ScriptingAgentConfig.xml.sample which is installed into C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents. Otherwise Exchange tools will fail starting pointing to the similar error as installation.
You simply right-click the file and remove sample from its name, so it becomes XML file.
Finally, after the installation of all my multi-role servers was over I have enabled Scripting agent back by running
Enable-CmdletExtensionAgent -Identity "Scripting Agent"
I hope this will be of a great use to you.