Auto-Fix Windows Update Agent

One of the hardest things to tackle in SCCM these days is client health.  It is an on-going issue because it is hard to diagnose and hard to programmatically fix.  SCCM’s client is much improved over older versions but it still has occasional issues and its dependencies such as WMI and Windows Update Agent still have theirs as well.

While looking into this for one customer I came up with a trick that won’t solve all client health problems, but it moves one step closer.  This trick is for some of the Windows Update Agent (WUA) issues.  If anyone uses this and finds issues or improvements please let me know and I will follow-up or correct this post as needed.

The first step is to identify the machines having WUA issues.  There are probably several ways but what I found useful was to look for clients sending 11416 status messages.  Creating a status message query was easy but creating a collection based on status messages takes a little more work to build.  Here is one I put together that seems to do the trick:

select distinct SYS.Name,SYS.Client from SMS_StatusMessage as stat join sms_r_system as SYS on stat.machinename = where stat.ModuleName = "SMS Client" and stat.MessageID = 11416 and DateDiff(dd,stat.Time, GetDate()) <1

This query gets all the machine names that have sent a 11416 status message in the last day and cross references with the system object for that machine so that a collection of machines can be put together.

Once you have your collection of machines identified the next step is to send those machines something to repair WUA.  KB971058 has a nice Fix It script that will do this and you can download it from the KB.  It is an MSI and in my testing using the default settings seemed to be enough to fix most machines.  As an MSI you can have SCCM create your package and program by creating a package from definition and pointing at the MSI file itself.  This should give you a silent run option.

Once you have the package in place advertise it to your collection created based on the query above and see if that solves your WUA health issues.  For my customer we saw a 92% reduction in WUA issues using this method.

** Correction** I had previously posted this as a WMI fix, when this is really a WUA fix.  I just had WMI on my brain.  My apologies for any confusion.

Comments (14)
  1. Hi HeyAdmin,

    It looks like the KB changed.  It was an MSI and now it appears to be an EXE that gets downloaded so you have to make your own package and program.  You may have to experiment with it a little bit to find how to get it to run silent.  I haven't had a chance to play with it myself yet.  I'll put it on my todo list and see what I can figure out, but if someone gets there first please post for all of us.

  2. Hi DBIG – I did have great success with the MSI.  Are you asking about the EXE?  I haven't tried the EXE solution yet.  None of my customers have asked me to and I haven't had a chance in my side time.  If you are able to test it please post pack with your results.

  3. I haven't tried it on a 2008 R2, but the steps should be about the same. You might try following the "Let me Fix It Myself" steps on a 2008 R2 and if it works then try running the script or making your own version of it on the 2008 R2 server.  Let us know how if it works.

  4. Anonymous says:

    Nice! Very handy.

    Thanks for the post.

  5. S. Rajini says:

    could you please WMI fix as well?

  6. norman says:

    Thank you very much.  This did the trick.

  7. Scott says:

    Is there a WUA repair for Server 2008 R2 ENT?

    Can not find a compatible FixIt.

  8. HeyAdmin says:

    How do I get the msi?  Sorry if this is obvious and I'm just not getting it!

  9. DBIG says:

    Hi Mike,

         Sorry for being lazy, but have you had any luck with the MSI?

  10. Kevin Z says:

    Now the FixIt is a WindowsUpdateDiagnostic.diagcab file that is loaded with a bunch of Powershell files. I have not had the time to dig though them yet. Has anyone already figured out how to leverage these to repair WUA yet?

  11. anonymouscommenter says:

    Long ago as part of a different post I provided a query to make collections based on status messages

  12. Raj says:

    Is this query to create a query based collection?

  13. Prasanna says:

    Please share the collection query to Current Branch

Comments are closed.

Skip to main content