≡ Menu

Exchange 2010 Setup Fails when Scripting Agent is Enabled

When adding an Exchange 2010 server into an existing organization with the scripting agent enabled, you may run into the following error stating that the ScriptingAgentConfig.xml cannot be found:

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’.””‘”.

Provisioning layer initialization failed: ‘”Scripting Agent initialization failed: “File is not found: ‘C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml’.””‘

“Scripting Agent initialization failed: “File is not found: ‘C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml’.””

I ran into this error when installing an Exchange 2010 SP1 multi-role server into an organization with the scripting agent enabled. The scripting agent is a cmdlet extension agent that allows you to call custom code when cmdlets are executed. It is enabled at the organization level, and requires the ScriptingAgentConfig.xml file to reside on each server to define the custom code that runs when cmdlets are executed.

To get around this error do the following:

  1. Disable the scripting agent by running Disable-CmdletExtensionAgent "Scripting Agent" from another Exchange server in the organization
  2. Re-run setup on the new server and it should complete successfully this time
  3. Copy the ScriptingAgentConfig.xml from <installation path>\V14\Bin\CmdletExtensionAgents on another server to the same path on the new server
  4. Re-enable the scripting agent by running Enable-CmdletExtensionAgent "Scripting Agent"

2 comments… add one

  • Nathan H April 27, 2011, 2:28 pm

    Had a feeling it was this.

    Found a little alternative if, like myself, you have a whole host of seperate Exchange servers and have it enabled on each one etc….

    After it fails with the above message, I found that it had still put a part of the Exchange Console installed, so I was able to browse to \V14\Bin\CmdletExtensionAgents and take a copy of the ScriptingAgentConfig.xml file from one of the other servers and place in this location.

    Then reruning the setup had me clear up after itself a bit…. of which following that process through, and then ran setup again where i was able to select the mailbox [in my case] role again (auto ticking the Mgmt Tools) and the install completed fully :)

    After this, i ran Enable-CmdletExtensionAgent “Scripting Agent” within a Exchange PS window on the new server, which completed successfully (well, no error outputted that is hehe).

    HTH.
    Nath.

  • Aaron October 18, 2011, 10:17 am

    Thank you. I accidentally had 2 extra spaces in my new CMDlet exensions and had just enabled the scripting agent… and I was confused why all of a sudden I was getting errors like the following text on every single command I tried to run inside the exchange management shell:

    Provisioning layer initialization failed: ‘”Scripting Agent initialization failed: Name cannot begin with the ‘ ‘ chara
    cter, hexadecimal value 0×20. Line 2, position 2.”‘
    + CategoryInfo : NotSpecified: (:) [], ProvisioningBrokerException

Leave a Comment