When you look at Windows Update History in Control Panel (Control Panel\All Control Panel Items\Windows Update\View update history), you get a 'Status' column that indicates whether the updates Failed or were Successful. I'm looking for a way to export the list of FAILED updates for a given Server. If I can also get the failure codes, that would be great.
I've already tried getting this information from the Win32_QuickFixEngineering WMI class, using PowerShell, like this:
"Get-WmiObject -Class Win32_QuickFixEngineering -Property * | Export-Csv c:\Scripts\WinUpdates.csv"
However, this only returns the updates that were successfully installed and the 'Status' Property is blank.
Where does the information in the Windows Update Status column come from, and how can I export a list of ALL of the updates, including the Failed ones? Is there a way to do this with PowerShell, or is there a better option?
Thank you!