PendingUpdates.ps1
function Update # Use COM object to query Windows Update $Session = New-Object -ComObject Microsoft.Update.Session $Searcher = $Session.CreateUpdateSearcher() $SearchResult = $Searcher.Search("IsInstalled=0") $PendingCount = $SearchResult.Updates.Count softprober plugins
param($action, $configPath) function Init # Load config if needed return $true PendingUpdates
function Cleanup return $true switch ($action) "init" Init "update" Update "cleanup" Cleanup softprober plugins