diff --git a/remove-kb.ps1 b/remove-kb.ps1 index 23e94b4..3c1dace 100755 --- a/remove-kb.ps1 +++ b/remove-kb.ps1 @@ -100,8 +100,9 @@ function hide_update() { param($kbList) $session = New-Object -ComObject "Microsoft.Update.Session" $searcher = $session.CreateUpdateSearcher() - #$searcher.Online = $false - $criteria = "" + $searcher.Online = $true + $searcher.IncludePotentiallySupersededUpdates = $true + $criteria = "IsInstalled=0" $result = $searcher.Search($criteria) Foreach ($kb in $kbList){ Write-Host -NoNewline -ForegroundColor White "Hide $kb : "