Error during Exchange CU update: “System.Management.Automation.RemoteException”

Issue: During Exchange 2013 Cumulative Update at step 12 of 13 the following error occurs:

error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);…” was run: “System.Management.Automation.RemoteException”.

Note: The full error messages is contained below in the resources section.

Cause: We believe this issue is caused by the relatively short timeout value of 120 that is specified in the IISRESET command as part of the CU upgrade.  If you review the long error message below you can find the text “”Start-SetupProcess -Name “iisreset” -Args “/timeout:120″”, which contains a timeout value of only 120 seconds.  Many servers IIS processes cannot stop this fast resulting in the upgrade failing.  It’s also possible the issue is permissions related from not running the cumulative update installer with enough privilege.

Solution:
1) verify you have several gigs free disk space on C drive of the server being upgraded
2) Stop the IISADMIN service and World Wide Web Services
3) Make sure the account your using to run the installer is member of schema admins, domain admins and exchange organization management
4) Run the upgrade again, but this time, right click the install file and click ‘run as administrator’

Resources:
Below is the entire very long error message:

Error:
The following error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);
$exchangeBinPath = [System.IO.Path]::Combine($RoleInstallPath, “bin”);
$frontEndPath = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”);
$clientAccessPath = [System.IO.Path]::Combine($RoleInstallPath, “ClientAccess”);
$sharedWebConfig = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”, “HttpProxy”, “SharedWebConfig.config”);

$a = &”$dependentAssemblyGeneratorExePath” -exchangePath “$exchangeBinPath” -exchangePath “$frontEndPath” -exchangePath “$clientAccessPath” -configFile “$sharedWebConfig”;
$a | % { if ($_.Length > 0) { Write-ExchangeSetupLog -Info “$_.ToString()” } }
Start-SetupProcess -Name “iisreset” -Args “/timeout:120”
” was run: “System.Management.Automation.RemoteException”.

Error:
The following error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);
$exchangeBinPath = [System.IO.Path]::Combine($RoleInstallPath, “bin”);
$frontEndPath = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”);
$clientAccessPath = [System.IO.Path]::Combine($RoleInstallPath, “ClientAccess”);
$sharedWebConfig = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”, “HttpProxy”, “SharedWebConfig.config”);

$a = &”$dependentAssemblyGeneratorExePath” -exchangePath “$exchangeBinPath” -exchangePath “$frontEndPath” -exchangePath “$clientAccessPath” -configFile “$sharedWebConfig”;
$a | % { if ($_.Length > 0) { Write-ExchangeSetupLog -Info “$_.ToString()” } }
Start-SetupProcess -Name “iisreset” -Args “/timeout:120”
” was run: “System.Management.Automation.RemoteException: Unhandled Exception:”.

Error:
The following error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);
$exchangeBinPath = [System.IO.Path]::Combine($RoleInstallPath, “bin”);
$frontEndPath = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”);
$clientAccessPath = [System.IO.Path]::Combine($RoleInstallPath, “ClientAccess”);
$sharedWebConfig = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”, “HttpProxy”, “SharedWebConfig.config”);

$a = &”$dependentAssemblyGeneratorExePath” -exchangePath “$exchangeBinPath” -exchangePath “$frontEndPath” -exchangePath “$clientAccessPath” -configFile “$sharedWebConfig”;
$a | % { if ($_.Length > 0) { Write-ExchangeSetupLog -Info “$_.ToString()” } }
Start-SetupProcess -Name “iisreset” -Args “/timeout:120”
” was run: “System.Management.Automation.RemoteException: “.

Error:
The following error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);
$exchangeBinPath = [System.IO.Path]::Combine($RoleInstallPath, “bin”);
$frontEndPath = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”);
$clientAccessPath = [System.IO.Path]::Combine($RoleInstallPath, “ClientAccess”);
$sharedWebConfig = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”, “HttpProxy”, “SharedWebConfig.config”);

$a = &”$dependentAssemblyGeneratorExePath” -exchangePath “$exchangeBinPath” -exchangePath “$frontEndPath” -exchangePath “$clientAccessPath” -configFile “$sharedWebConfig”;
$a | % { if ($_.Length > 0) { Write-ExchangeSetupLog -Info “$_.ToString()” } }
Start-SetupProcess -Name “iisreset” -Args “/timeout:120”
” was run: “System.Management.Automation.RemoteException: System.UnauthorizedAccessException: Access to the path ‘C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\SharedWebConfig.config’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at Microsoft.Exchange.Management.DependentAssemblyGenerator.UpdateConfigFile(String configFilePath, IList`1 exchangeAssemblies, Int32& numAssembliesAdded)
at Microsoft.Exchange.Management.DependentAssemblyGenerator.Main(String[] args)”.

Error:
The following error was generated when “$error.Clear();
$dependentAssemblyGeneratorExePath = [System.IO.Path]::Combine($RoleInstallPath, “bin”, “DependentAssemblyGenerator.exe”);
$exchangeBinPath = [System.IO.Path]::Combine($RoleInstallPath, “bin”);
$frontEndPath = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”);
$clientAccessPath = [System.IO.Path]::Combine($RoleInstallPath, “ClientAccess”);
$sharedWebConfig = [System.IO.Path]::Combine($RoleInstallPath, “FrontEnd”, “HttpProxy”, “SharedWebConfig.config”);

$a = &”$dependentAssemblyGeneratorExePath” -exchangePath “$exchangeBinPath” -exchangePath “$frontEndPath” -exchangePath “$clientAccessPath” -configFile “$sharedWebConfig”;
$a | % { if ($_.Length > 0) { Write-ExchangeSetupLog -Info “$_.ToString()” } }
Start-SetupProcess -Name “iisreset” -Args “/timeout:120”
” was run: “System.Management.Automation.RemoteException:
“.

One thought on “Error during Exchange CU update: “System.Management.Automation.RemoteException”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.