Exchange 2010 and Server 2012 – Access denied to stop services installing roll up

2017-12-07T09:34:23+00:00 March 21st, 2014|Azure, Exchange, Windows|


Recently we came across and odd issue trying to install RU 5 for Exchange 2010 SP3. This was a brand new install on Windows Server 2012, Exchange 2010 SP3 installed without issue. However, when we tried to run the update it would try to stop services and fail with a 1603 generic error that something went wrong. Upon further investigation we checked the Exchange setup log which pointed us to the services log which showed access denied on stopping the Exchange services. Odd, as we had run it from an admin command prompt!

In desperation we ran the install with verbose logging:

Exchange2010-KB<RollupPackageNumber>-x64-EN.msp /lxv* c:<path><filename>.log

The file wasn’t terribly helpful however we did start looking at the services script that is run as part of the update. We noted the following error in the log:

“control cannot leave a finally block”

From there it led us to look at the ManagedScheduleTask.ps1 script which is run as part of a rollup install – this is stored in the general Exchange Scripts folder. We found the following blog which solved our issue:

We double checked that we had powershell 3.0 installed: $PSVersionTable which showed we were at version 3 – our problem! It appears that the ManagedScheduleTask.ps1 script uses powershell 2.0 structure and this produces the finally block error. For us we followed the blog fix – to rename the old script, create a new blank one and try again – success! It is noted in the comments that you can amend the script as follows:

“return $success” to the logically equivalent “Write-Output $success” in line 462

Please note however this fix is untested. The new blank file workaround fixed it for us and also it is important remember to set it back once you have successfully installed the rollup.

Hope it helps!