Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| Function WSUSUpdate { | |
| $Criteria = "IsInstalled=0 and Type='Software'" | |
| $Searcher = New-Object -ComObject Microsoft.Update.Searcher | |
| try { | |
| $SearchResult = $Searcher.Search($Criteria).Updates | |
| if ($SearchResult.Count -eq 0) { | |
| Write-Output "There are no applicable updates." | |
| exit | |
| } | |
| else { |