Categories

Windows Updates: 2 Installed updates

Testing for installed updates is a variation on what we saw last time. This will show updates that Windows updates has installed – Get-Hotfix will show all updates that have been installed.

001
002
003
004
005
006
007
008

function get-installedupdate {
$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()

$result = $searcher.Search("IsInstalled=1 and Type='Software'" )

$result.Updates | select Title, LastDeploymentChangeTime
}

 

The main difference is that we now search on IsInstalled=1 (true) rather than IsInstalled=0 (false)

The title and date are displayed.

Leave a Reply