Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
14 days ago

Can LM check for Windows Updates?

Hi,

I was asked if there's any way that people can look at something to see if all our machines are up to date with Windows Updates.  I thought maybe LM could see that information and could report a simple 1/0 (yes/no) if each machine had a certain KB# installed or had the proper Windows Version.

One thought was that I could provide the application KB#### for each OS's Cumulative Update each month and LM could somehow check and see if each machine had it installed or not.

The other thought was I could provide the latest Windows Versions (e.g. 17763.6189) each month and LM could check and see if each machine had the matching number or not.

I don't know if either of these is possible, but thought I'd check and see if anyone knew of anything that might work.

Thanks.

  • I checked the Exchange and there looks to be a "_Windows patches needed" datasource that might be close to what you want. But in general what you are asking for sounds very doable but likely something you need to write code to implement. Using the PSWindowsUpdate powershell module might be useful for that.

    One thing to keep in mind, in general you want datasources to run as fast as possible and they do have a timeout (2min by default in the collector). So you likely don't want to try to actually kick off a real windows update scans in the check unless you account for that.

  • I'll give it a look.  We use PSWU to do our Windows Update installs and really just wanted a dashboard that would show any machine that isn't up to date, or a count of machines that aren't up to date that you can click on to see more, or something.

    Just kind of brainstorming for now to see what's possible.

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Mastermind rankMastermind

      You mean this? If so, you may consider modifying his script (and doing a pull request) so that the results are written out to a json file or some other kind of permanent storage object on the target server. That way you can write a simple datasource to grab the contents of that file and pipe them into LM. That would get the metrics into LM without doing additional calls since PSWU is already doing that part for you.