Slow WUA (Windows Update API) Slow WUA (Windows Update API) powershell powershell

Slow WUA (Windows Update API)


Look like the cache is a CAB file called wsusscn2.cab that is regularly downloaded from MSFT. There is a direct link to it in the msdn link I posted below. Perhaps write a script that downloads that once per day/week (maybe to a network share if this is going to be a widely deployed script), and then change your script to force it to always look at the CAB file instead of online. Like this:

$Session = New-Object -ComObject Microsoft.Update.Session       $UServiceManager = New-Object -ComObject Microsoft.Update.ServiceManager$UService =  $UServiceManager.AddScanPackageService("Offline Sync Service", "c:\wsusscn2.cab") $Searcher = $Session.CreateUpdateSearcher()$Searcher.ServerSelection = 3  $Searcher.ServiceID = $UService.ServiceID$Criteria = "IsInstalled=0 and Type='Software'"$SearchResult = $Searcher.Search($Criteria)           $SearchResult.Updates 

msdn