þÿ#Example Script to remove an Orphaned update from WSUS #Greg Ramsey - ramseyg@hotmail.com #Run this from WSUS for central site server #Load .NET assembly [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") #Connect to WSUS server $wsusrv = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer() #Get all the non-microsoft updates $otherupdates = $wsusrv.GetUpdates() | select * | ? {$_.UpdateSource -ne "MicrosoftUpdate"} #This is an ugly way to do it, but the only way I could. #Look to see if there's an update with the unique guid "28b65392-0beb-44b9-bf77-eb8e8e8c2d8a" - and display the info $otherupdates | % {if ($_.id.updateid.tostring() -eq "28b65392-0beb-44b9-bf77-eb8e8e8c2d8a") {$wsusrv.GetUpdate($_.id)}} #Expire the Update with unique ID = "28b65392-0beb-44b9-bf77-eb8e8e8c2d8a" $otherupdates | % {if ($_.id.updateid.tostring() -eq "28b65392-0beb-44b9-bf77-eb8e8e8c2d8a") {$wsusrv.ExpirePackage($_.id)}}