Windows Updates Fail Error Code 0x800F0831 Server 2012 R2

I recently had an issue installing Windows updates on some servers running Windows Server 2012 R2. The server would install most updates but not the monthly update rollups or the security only updates.

I checked the event logs and saw event 0x800F0831Up2

This didn’t give much information on why the update was failing so I checked the CBS log under C:\Windows\Logs\CBS and found the below error. This pointed to a missing or corrupted update for KB4343898 which in my case was the August 2018 monthly update rollup. Up3

CBS Failed to resolve package ‘Package_1101_for_KB4343898~31bf3856ad364e35~amd64~~6.3.1.9’ [HRESULT = 0x800f0831 – CBS_E_STORE_CORRUPTION]

CBS Mark store corruption flag because of package: Package_1101_for_KB4343898~31bf3856ad364e35~amd64~~6.3.1.9. [HRESULT = 0x800f0831 – CBS_E_STORE_CORRUPTION]

Next step was to check to see if the update was showing on the server so I used the PowerShell command Get-hotfix to search for the update.

Get-hotfix | where {$_.hotfixid -like “KB4343898”}Up4

If I check the package folder C:\Windows\servicing\Packages  I can see the update is referenced but not the package showing the error in the CBS log. UP6

I had this issue a few years back and the fix was to add the update using Dism and the update cab file. To extract the update run expand updatefile /f:* exportpath

expand C:\temp\windows8.1-kb4343898-x64.msu /f:* C:\temp\KB4343898Up5Once the update is extracted use Dism to add the problematic update this should install the missing files.

Dism /online /Add-package:C:\temp\KB4343898\Windows8.1-KB4343898-x64.cabUp7

Once completed reboot the server if required, then try the update again, it should now install without issue.

10 thoughts on “Windows Updates Fail Error Code 0x800F0831 Server 2012 R2

  1. This article was fantastic, and seriously saved me. I struggled for quite a while looking through other posts and forums regarding 0x800F0831 on Server 2012 R2 and wasn’t getting it fixed. Note to others that the error wasn’t always the same in the windows update screen, but the event logs showed this consistently. This article was concise, easy to follow, and resolved the issue. Thank you!

    Like

  2. expand C:\Temp\windows8.1-kb4592495-x64_3e1dde02bebbe5e66e218da08be0e90f9a077e76 /f:* C:\Temp\kb4592495

    I get errror cannot open input file: c:\temp\windows8.1-kb4592495-x64_3e1dde02bebbe5e66e218da08be0e90f9a077e76.

    please help, ASAP m looking for solution

    Like

      1. Hi Sir,

        I have tried above and says it completed successfully, but when rebooted the patches didn’t successfully installed, I have tried everything. Only these two KB4592484 and KB4592495 Monthly Quality Rollup and Security Quality Update, both updates fail to install, its happening on 3-4 VM Servers.

        Thanks.

        Event 31 = WindowsUpdateClient
        Windows Update Failed to download an update.

        Please, let me know if you need to me share any other logs, problem is this specific updates for this month December installed successfully on other Windows 2012 R2 VM servers, only 3-4 which includes domain controllers. Please, help as really don’t want to rebuild them.

        Like

  3. Installation Failure: Windows failed to install the following update with
    error 0x800f0922: 2020-12 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4592495)

    I see the above showing up for this VM Windows 2012 R2 on our internal WSUS.

    Please, assist ASAP.

    Like

  4. ok so did the expand, repair and install. On the powershell says it installed successfully, and also under View update history, installed successfully, issue occurs now, when it asks to restart the VM, it goes until 75% then do undo changes. Is there way to install the update using the above commands and having to reboot the VM, i think that might fix it as no reboot required. Rightnow, issue is with rebooting it do undo changes.

    Like

    1. Hi Yasir

      There can be loads of reason why an update doesn’t install. I can’t troubleshoot your servers for you.

      What I usually do is check the Windowsupdate log and CBS log for errors after trying to install the update.

      Also try using DISM commands to check the health of the operating system.

      https://docs.microsoft.com/en-us/troubleshoot/windows-server/deployment/fix-windows-update-errors#resolution-for-windows-10-and-windows-server-2012-r2

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s