Some Installed KB where not detected as 'not Installed' in hide_update()
This commit is contained in:
parent
47b910a014
commit
9e18332826
1 changed files with 3 additions and 2 deletions
|
@ -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 : "
|
||||
|
|
Reference in a new issue