I was working on some updates to our unified reporting solution for Windows Updates (ie WUfB + MEMCM) and I wanted to figure out simply from the OS build number whether a Windows 10 workstation has the latest cumulative update installed. The only reliable and useable static list I could find for Windows 10 build numbers is Microsoft’s Windows 10 Update History web page, so I decided to build a PowerShell script that parses the page to get current patch info.
The script below can be used to report which OS build a Windows 10 workstation is currently on as well as which update is the latest update available to the device. It can also report on all Windows updates published for the version of Windows 10 a workstation is currently on.
Run the script as is to show you:
- Current OS version
- Current OS Edition
- Current OS Build number
- The installed update that corresponds to that build number, as well as the KB number and a link to the info page
- The latest available update for the OS version
Compare the latest available update with the currently installed one to know if the OS is up-to-date.
If there are Preview or Out-of-band updates available that are more recent than the one you have installed, you can exclude those from being reported as a latest available update, so you can just focus on the cumulative updates.
Get-CurrentPatchInfo -ExcludePreview -ExcludeOutofBand
You can also list all Windows updates that Microsoft have published for your OS version like so:
Again focus on just the cumulative updates if you want by excluding Preview and Out-of-band updates from the list:
Get-CurrentPatchInfo -ListAvailable -ExcludePreview -ExcludeOutofBand
Obviously the script does require internet access and I’ve tested it on PowerShell 5.1 and 7.1.