Tuesday 27 March 2018

Office 365 Updates via SCCM showing as "Not Required" and then error 0x80040154

I was at a client site today and they had two issues with Office 365 Updates being pushed via SCCM.

The first issue was that the update was not showing as "Required" and then the second issue was that the update would not install but show an error code of 0x80040154.


Issue 1:


When reviewing SCCM there were no devices that required the update.


You can see there should be at least 137 devices that required the update.


This meant that the Click-to-Run configuration was incorrect. When reviewing the Windows Update Logs using the Powershell command Get-WindowsUpdateLog I noticed that the Office Channel was "Deferred".


I doubled checked the update channel of Office by navigating to the following registry key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration.

Checking the CNDBaseUrl key will show you the Content Delivery Network URL. 


To confrim the channel is correct compare with the links below:

·       Semi-Annual Channel
CDNBaseUrl = http://officecdn.microsoft.com/pr/7ffbc6bf-bc32-4f92-8982-f9dd17fd3114
·       Monthly Channel (Targeted)
CDNBaseUrl = http://officecdn.microsoft.com/pr/64256afe-f5d9-4f86-8936-8840a6a4f5be
·       Semi-Annual Channel (Targeted)
CDNBaseUrl = http://officecdn.microsoft.com/pr/b8f9b850-328d-4355-9145-c59439a0c4cf

I was able to confirm that the Semi-Annual Channel (Targeted) was selected. When checking deeper I found that the OfficeChannel which was showing in the Windows Update logs was from the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\16.0\Common\OfficeUpdate\"

The update branch is using the old naming standard by Microsoft This is still part of the Group Policy ADMX's which Microsoft releases with Office 2016. You can see the below link:

https://getadmx.com/?Category=Office2016&Policy=office16.Office.Microsoft.Policies.Windows::L_UpdateBranch


Resolution:

Force a channel change to ensure all the correct registry keys are set for the Click-to-Run agent. This will allow SCCM to correctly identify the right update channel. Below is the PowerShell command I use to refresh the update channel to Semi-Annual Channel (Targeted).



Issue 2: 


After the update was being detected it was attempting to install but it will always fail with 0x80040154. This error means that the class is not registered.

Resolution:

I did some research and found that the  Office 365 Click-to- run provides a Com interface for the Update Mangement. More information in below link.

https://msdn.microsoft.com/en-us/library/office/mt608768.aspx

This allows me to stumble on the following Reddit article which provided a script to re-register the  OfficeC2RCom.

https://www.reddit.com/r/SCCM/comments/7jsyby/office_365_updates_failing_0x87d0024a/


Overal Solution: 

Now putting both solutions together I created the below script.





Hope this helps someone...

No comments:

Post a Comment