May 6 - 9 | San Francisco | Booth #5472

Action1 5 How-to Articles 5 PowerShell One-liner to Check for Missing Windows Updates

PowerShell One-liner to Check for Missing Windows Updates

January 3, 2023

By Mike Walters

Here is a very short PowerShell one-liner that checks for missing Windows updates on the local computer:

(New-Object -ComObject Microsoft.Update.Session).CreateupdateSearcher().Search(“IsHidden=0 and IsInstalled=0”).Updates | Select-Object Title

An alternative way to do this is to use the Get-WindowsUpdate cmdlet to retrieve a list of available updates. To check for updates that have not yet been installed, you can use the -IsInstalled parameter and set it to $false:

GetWindowsUpdate IsInstalled $false

Both methods should return the same result – retrieve a list of updates that are available to be installed, but have not yet been installed on the system.

Here is another cool PowerShell one-liner script that installs all missing updates:

GetWindowsUpdate IsInstalled $false | InstallWindowsUpdate

This script will install all of the missing updates that were returned by the Get-WindowsUpdate cmdlet. You can also use the -MicrosoftUpdate parameter to specify that you want to install updates from Microsoft Update, rather than just Windows Update.

P.S. Checking for missing Windows updates via scripts is a very common troubleshooting technique utilized by users of commodity RMMs not specifically designed for patch management. Give Action1 a shot to see why it’s the best purpose-built patch management system. It’s free for your first 100 endpoints.

See What You Can Do with Action1


Join our weekly LIVE demo “Patch Management That Just Works with Action1” to learn more

about Action1 features and use cases for your IT needs.


spiceworks logo
getapp logo review
software advice review
g2 review
spiceworks logo

Related Posts

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.