Windows Update not working on Windows 2012 R2 Standard

311,791

Solution 1

Two of my three 2012R2 machines exhibited this behavior last April. They would hang at Checking for updates... forever.

I never learned exactly what caused the problem, but I did get it resolved by doing the following:

  1. Stop the Windows Update service.

    net stop wuauserv
    
  2. Delete the Windows Update cache directory C:\Windows\SoftwareDistribution.

    Remove-Item -Recurse -Force C:\Windows\SoftwareDistribution
    
  3. Restart the computer. (On one machine it required several restarts to actually get everything deleted from this directory, so keep trying if necessary.)

  4. Run Windows Update manually again. It will fail almost instantly and offer to run a diagnostic tool. Download the tool and allow it to run.

  5. The tool will find and fix some problems. At this point, run Windows Update manually again. Windows Update worked fine at this point.

Solution 2

i found this great answer here and it worked beautifully for me. Just want to share in case someone is searching:

Try this at an elevated command-prompt:

netsh winhttp import proxy source=ie

and reboot

another solution which worked for me as well was to set update mode to "Never check for updates"

Solution 3

My fix on a newly Installed on Windows Server 2012 R2 on Citrix 6.5 VM, and as Marcus Greasly posted, disable IE Enchanced Security... worked immediately...

To disable IE enhanced security in windows server 2012 R2, launch the Server Manager, on the left hand side click on Local Server. On the right hand side click on the On link next to IE Enhanced Security Configuration. You will now see the Internet Explorer Enhanced Security Configuration box.

https://prajwaldesai.com/disable-ie-enhanced-security-in-windows-server-2012-r2/

Share:
311,791

Related videos on Youtube

Scot
Author by

Scot

Updated on September 18, 2022

Comments

  • Scot
    Scot over 1 year

    I recently inherited the management of a Windows 2012 server at a remote site.

    I checked Windows Update and it has not been updating since March. When I tell Windows to check for updates, it acts like it is checking, but it seems to say that for hours. If I attempt to restart the windows update service, it seems to never be able to shut down. My only remedy seems to be rebooting to get back to the point where I can tell Windows Update to check for new updates.

    The last successful check for updates says March 20.

    The last time updates were installed says March 17 (failed).

    The update history shows that one update failed for March 17, a printer driver update, but the history shows 13 failed updates for Feb 17.

    Not sure what else to try.

    • Davidw
      Davidw over 9 years
      Is it pulling the updates directly from Microsoft, WSUS, or SCCM?
    • Scot
      Scot over 9 years
      Directly from Microsoft.
    • xXhRQ8sD2L7Z
      xXhRQ8sD2L7Z about 9 years
      What is the exact error in \Windows\WindowsUpdate.log? See support.microsoft.com/kb/938205 for error codes
    • niveshsaharan
      niveshsaharan over 7 years
      It is answered here: serverfault.com/a/830047/398329 I found it helpful.
    • Scot
      Scot about 7 years
      I appreciate the comments and possible answers. I have not been back to this question for over a year or two. I am going to award an answer based on votes, but the answer with the most votes so far also has one strong recommendation in the comment against touching the C:\Windows\SoftwareDistribution folder, so anyone with the same should heed the warning from @MichalSokolowski. BTW, The system in question started working soon after I posted this question. Another staff member tweaked something, but they never told me what that tweak was, and now, they don't remember what they did.
  • Scot
    Scot over 9 years
    Got to step 4, but it did not fail instantly or offer to run a diagnostic tool. It just keeps running with the progress bar cycling over and over, never getting any updates.
  • Mitch
    Mitch over 9 years
    I've used the System Update Readiness Tool recently, and successfully, as well.
  • Michael Hampton
    Michael Hampton over 8 years
    Try the linked Windows Update Diagnostic tool at that point, whether Windows offers it or not.
  • Michal Sokolowski
    Michal Sokolowski over 7 years
    I highly encourage everyone to read this technet thread (social.technet.microsoft.com/Forums/windowsserver/en-US/…) before touching Windows software distribution folder and blindly deletion.
  • Michael Hampton
    Michael Hampton over 7 years
    @MichalSokolowski "There is NO reason, on a properly functioning system, why this folder should ever need to be touched." Indeed, but we are not discussing properly functioning systems here.
  • Michal Sokolowski
    Michal Sokolowski over 7 years
    I wanted to underline something else here; destroying Windows Update Agent patch history is really bad idea, because after deletion it lose capability to determine what was patched and what was not. In a nutshell conclusion are (according to that thread): 1) deleting softwaredistribution should be treated as last resort before reformating the box, 2) deleting it need to be preceded by proper diagnosis - i.e. broken DataStore.EDB, desynchronized DataStore.EDB and Download folder - those are most common. Deleting DataStore\Logs contents will destroy patch history.
  • Andreas Reiff
    Andreas Reiff over 7 years
    @MichalSokolowski You probably are right. Still - on every one of my systems, Windows 2k3, 2012, 2012R2, 7, 8, 8.1 (not 10 yet) I have had the same problem. So.. proper analysis is a little difficult unless you want to make a full time job out of it. I am having same problem on other people's machines too, so it cannot be just my fault but must be some general Windows Update problem (especially fresh installs of older OSs).
  • GlennG
    GlennG almost 5 years
    What does this do?