When managing updates, the first step Windows performs is scanning for reporting on the applicable updates. This is performed automatically by the Windows update client randomly during the day and reported to the update server. However, this process can be manually initiated and the results viewed at the local client.
In this recipe, we will be working with a client that has already been configured with a local update server.
Complete the following steps to report on missing updates:
Create the searcher object:
$searcher = New-Object -ComObject Microsoft.Update.Searcher $searcher.Online = $true $searcher.ServerSelection = 1
Define the search criteria:
$results = $searcher.Search('IsInstalled=0')
Display the results:
$results.Updates | ` Select-Object @{Name="UpdateID"; ` Expression={$_.Identity.UpdateID}}, Title
When executed, the list of available updates will be returned as shown in the following screenshot: