# Add Failed Updates to script output (Win32\_reliabilityrecords)

**URL:** <https://forums.powershell.org/t/add-failed-updates-to-script-output-win32-reliabilityrecords/17988>\
**Category:** PowerShell Help\
**Created:** [November 19, 2021, 7:11pm UTC](https://forums.powershell.org/t/add-failed-updates-to-script-output-win32-reliabilityrecords/17988 "2021-11-19T19:11:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![powershell-noob](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@powershell-noob](https://forums.powershell.org/u/powershell-noob)\
**Post date:** [November 19, 2021, 7:11pm UTC](https://forums.powershell.org/t/add-failed-updates-to-script-output-win32-reliabilityrecords/17988/1 "2021-11-19T19:11:34Z")

</div>

I’m looking for a way to also output any failures. The below script currently gets me the updates, HotFixID, installdate, and if the server is pending reboot.

```auto
	$Results = Get-CimInstance -ClassName Win32_QuickFixEngineering -ComputerName $computers | where { $_.InstalledOn -gt (get-date).AddDays(-30) }
	
	$Results | Select-Object -Property @{ Name = "Computer"; Expression = { $_.PSComputerName } }, Description, HotFixID, InstalledOn, @{
		Name = 'RebootPending'; Expression = {
			
			('No', 'Yes')[(Get-PendingReboot $_.PSComputerName | Select-Object -ExpandProperty RebootPending)]
		}
	} | sort @{ Expression = "RebootPending'"; Descending = $true }, Server | Out-GridView -Wait
	Write-Host "Complete"
}

```

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:20pm UTC](https://forums.powershell.org/t/add-failed-updates-to-script-output-win32-reliabilityrecords/17988/2 "2024-05-16T20:20:25Z")

</div>


