Skip to content

Commit

Permalink
Fixes 0x8024402c (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee authored Oct 9, 2022
1 parent 34d7586 commit ece44b5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion private/Get-Needed.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ function Get-Needed {
throw $PSItem
}
}

Write-Verbose -Message "Creating update searcher"
$searcher = $wua.CreateUpdateSearcher()
$searcher.ServerSelection = 3
$searcher.ServiceID = $packageservice.ServiceID.ToString()
} else {
Write-Verbose -Message "Creating update searcher"
$searcher = $wua.CreateUpdateSearcher()
}
$searcher = $wua.CreateUpdateSearcher()
Write-Verbose -Message "Searching for needed updates"
$wsuskbs = $searcher.Search("Type='Software' and IsHidden=0")
Write-Verbose -Message "Found $($wsuskbs.Updates.Count) updates"
Expand Down

0 comments on commit ece44b5

Please sign in to comment.