Categories: Exchange

Exchange 2013 CU9 KB3087126 installation goes bad

After installing CU9 on our customers systems and rebooting Windows we usually check for any additional updates that may come up after new installation. Updates actually came up with Security Update for Exchange Server 2013 CU9 (KB3087126). If you trust Microsoft like us, and you always want your systems up to date, you instantly click Install to make sure you're protected. Unfortunately things  didn't go as planned.

Problem description

Updating Windows and other Microsoft products thru Windows Updates is a straight forward procedure. You click Install, it goes for few minutes, you reboot and everything is protected. So after seeing a new update for CU9 that we just installed KB3087126 we simply pressed Install and waited for results.

Installation starts and progresses for a while to finally say it failed. While usually it isn't big deal, you simply reboot the server to find out your Exchange isn't actually working (that's where Exchange 2013 DAG system comes in handy). You go to check services.. and there it is:

 

All Exchange related services are in disabled state along with IIS and WMI. That's bad news for Exchange.

How to fix the problem

Before we can fix the issue at hand we have to make sure our Exchange 2013 CU9 goes up and starts running. First we need to set startup type from Disabled to Automatic, and actually start our services.

One can do this manually or using specially prepared script just for this occasion, but something that comes in handy during failed installs that leave Exchange services in that state.

What the script actually does is start WMI services as those are disabled, and set IIS and Exchange services in Automatic state, and then finally it asks for reboot.

$microsoftExchangePath = "C:\Program Files\Microsoft\Exchange Server"`

# Start WMI as it was disabled
Set-Service Winmgmt -Startup Automatic # WMI was disabled
Set-Service Winmgmt -Status Running # WMI needs starting

# Start IIS as it was disabled
Set-Service W3SVC -StartupType Automatic 
Set-Service IISADMIN -StartupType Automatic

# Start other services that were disabled during update
Set-Service RemoteRegistry -StartupType Automatic
Set-Service AppIDSvc -StartupType Automatic
Set-Service Pla -StartupType Automatic

# Search for all Exchange services based on their binary location
$exchangeServices = Get-WmiObject win32_service | ?{$_.PathName -like "*$microsoftExchangePath*"} | select Name, DisplayName #, @{Name="Path"; Expression={$_.PathName.split('"')[1]}}
Foreach ($service in $exchangeServices) {
    Write-Host "Setting StartUP to Automatic for service $($service.Name)"
    Set-Service $($service.Name) -StartupType Automatic
}
Restart-Computer -Confirm

While it could simply start the services this was to make sure they are started in proper order and that Exchange works as designed after reboot. And it did. After reboot, checking services show as up and running.

 

Further verification with well known Test-ExchangeServerHealth.ps1 that our server is fully up and running.

------ Checking MAIL1
DNS Check: Pass
Ping Check: Pass
Uptime (hrs): 0
Server version: Exchange 2013
Roles: Mailbox, ClientAccess
Mailbox Server Role Services: Pass
Client Access Server Role Services: Pass
Unified Messaging Server Role Services: Pass
Hub Transport Server Role Services: Pass
Total Queue: 0
Mailbox databases mounted: Pass
Mail flow test: No active mailbox databases

 

But the problem is still there. The CU9 KB3087126 is still waiting to be installed. Further more it's telling Windows it actually wants to do it as soon as you let it to.

 

Since we have Exchange 2013 up and running now depending on how tired you are already it's up to you if you want to let it run for a moment or you go straight to fix it.

Manual installation of KB3087126

To fix it one has to manually install KB3087126. You can follow this simple steps (keep in mind this process on fairly fast machine takes about 1 hour):

Download KB3087126 straight from Microsoft

Open CMD as Administrator and go to path where the file is downloaded (I feel safer doing this via command line due to old habits where some things even when run as Administrator simply didn't work without CMD workaround – even with newer products). 

Execute Exchange2013-KB3087126-x64-en.msp file and answer all prompts with default answers pressing Next most of the time. 

Press Next

Wait for installer to finish up. As you can see below it's actually taking services down before doing any work. It may take up to 5 minutes to start the process. 

Then there's Validation procedure

Which in our case finds out that one of the Monitoring Services of Pulseway is causing some troubles (which could be the problem why the patch didn't install correctly). 

We stop the service, and press Retry, and wait for the Validation procedure to finish it up. Actually installer should have made validation pre-check before taking down all the services and leaving Exchange in bad state. 

After that is out of the way the Copying new files process begins

After which we simply watch as a progress go thru. 

To go to starting services we've been patiently waiting for (which takes awfully long time). 

And finally 

After pressing Finish and quickly checking up services Exchange seemed to be up and running. However there was still Reboot and Update message pending. So to make sure things don't get sideways quickly typing shutdown /r in CMD window gets Windows rebooted without applying any other updates, and re-running Check for Updates cleans up this little glitch in Windows. 

Notes

Please keep in mind that while in our case manual installation went pretty straightforward but you may need Exchange CU9 installation package on hand when installer asks for it, as this seems another reason why Exchange 2013 CU9 KB3087126 fails by not being able to find CU9 where it was installed from. It seems patches for Exchange Cumulative Updates requires a full CU installation media before being able to make an update.

Also rerunning test procedures if Exchange is really fine after update is highly encouraged.

This post was last modified on 2 kwietnia, 2016 11:22

Przemyslaw Klys

System Architect with over 14 years of experience in the IT field. Skilled, among others, in Active Directory, Microsoft Exchange and Office 365. Profoundly interested in PowerShell. Software geek.

Share
Published by
Przemyslaw Klys

Recent Posts

Upgrade Azure Active Directory Connect fails with unexpected error

Today, I made the decision to upgrade my test environment and update the version of…

2 miesiące ago

Mastering Active Directory Hygiene: Automating Stale Computer Cleanup with CleanupMonster

Have you ever looked at your Active Directory and wondered, "Why do I still have…

3 miesiące ago

Active Directory Replication Summary to your Email or Microsoft Teams

Active Directory replication is a critical process that ensures the consistent and up-to-date state of…

7 miesięcy ago

Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell

Hey there! Today, I wanted to introduce you to one of the small but excellent…

12 miesięcy ago

Active Directory Health Check using Microsoft Entra Connect Health Service

Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…

1 rok ago

Seamless HTML Report Creation: Harness the Power of Markdown with PSWriteHTML PowerShell Module

In today's digital age, the ability to create compelling and informative HTML reports and documents…

1 rok ago