Thursday, March 17, 2016

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 = SYS.name where stat.ModuleName = "SMS Client" and stat.MessageID = 11416 and DateDiff(dd,stat.Time, GetDate()) <1 em="">
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.

http://blogs.technet.com/b/michaelgriswold/archive/2010/04/15/auto-fix-wmi.aspx

No comments:

Post a Comment