23 June,2012 by Tom Collins
I was troubleshooting a SQL Server problem . I was stuck , as I couldn’t remember making any changes. I started investigating any patch updates on the server. Powershell and the Microsoft.Update.Session object do a go job on returning the patch list.
From discovering the latest patches updated , I was able to investigate what changes occurred.
This script lists all the patches/updates installed on the server
$MicrosoftUpdateSession = New-Object -ComObject Microsoft.Update.Session $SearchResult = $null $UpdateSearcher = $MicrosoftUpdateSession.CreateUpdateSearcher() $UpdateSearcher.Online = $true $SearchResult = $UpdateSearcher.Search("IsInstalled=1 and Type='Software'") $x = 1 foreach($Update in $SearchResult.Updates) { Write-Host "$x : $($Update.Title + " - " + $Update.SecurityBulletinIDs)" $x += 1 }
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |