20.7. Getting Information About Software
An important regular maintenance task is keeping all our software up to date. Of course, the most important piece of software is the operating system. We can use WMI to query the state of installed service packs and updates for all computers on the network and then trigger alarms when something is not up to date, just like we could for hardware queries.
20.7.1. Operating System Updates
The first thing that we may need to check is the operating system version and its installed service packs. We can get that from the Win32_OperatingSystem object for the current machine:
PS> gwmi Win32_OperatingSystem | ' select Name,Version,BuildNumber,' ServicePackMajorVersion,ServicePackMinorVersion | Format-List Name ...
Get Pro Windows PowerShell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.