Skip to content

Instantly share code, notes, and snippets.

@Colby-PDQ
Created August 7, 2019 22:47
Show Gist options
  • Save Colby-PDQ/48b172b1a2afb12368ac212dad641870 to your computer and use it in GitHub Desktop.
Save Colby-PDQ/48b172b1a2afb12368ac212dad641870 to your computer and use it in GitHub Desktop.
A PDQ Inventory Scan Profile and Basic Report that look for failed Windows Updates.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="17.1.0.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>WMIScanner_55_View</Table>
<TableTitle>WMI (Failed Updates)</TableTitle>
<Column>TimeGenerated</Column>
<Comparison>After</Comparison>
<Value>7 days ago</Value>
</ValueFilter>
</Filters>
</RootFilter>
<ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
<Columns type="list">
<Column>
<Column>Name</Column>
<Summary></Summary>
<Table>Computer</Table>
<Title></Title>
</Column>
<Column>
<Column>ProductName</Column>
<Summary></Summary>
<Table>WMIScanner_55_View</Table>
<Title>Failed Patch Name</Title>
<TableTitle>WMI (Failed Updates)</TableTitle>
</Column>
<Column>
<Column>TimeGenerated</Column>
<Summary></Summary>
<Table>WMIScanner_55_View</Table>
<Title>Date Attempted</Title>
<TableTitle>WMI (Failed Updates)</TableTitle>
</Column>
</Columns>
</ReportDefinition>
<Created>2019-08-06T16:03:15.0000000-06:00</Created>
<Description></Description>
<IsNew value="false" />
<Modified>2019-08-07T16:43:05.0000000-06:00</Modified>
<Name>WMI - Failed Updates</Name>
<Path>Reports\WMI - Failed Updates</Path>
<ReportFolderId value="1" />
<TypeName>BasicReport</TypeName>
<ReportType>BasicReport</ReportType>
</Report>
</AdminArsenal.Export>
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="17.1.0.0" MinimumVersion="14.0">
<ScanProfile>
<Collections type="list" />
<Scanners type="list">
<Scanner>
<WMIClassName></WMIClassName>
<ModifiedDate>2019-08-06T16:02:48.0000000-06:00</ModifiedDate>
<UsePreferencesTimeout value="true" />
<Name>Failed Updates</Name>
<Namespace>CIMV2</Namespace>
<WQL>SELECT Message, ProductName, TimeGenerated FROM Win32_ReliabilityRecords WHERE SourceName = 'Microsoft-Windows-WindowsUpdateClient' AND Message LIKE '%failure%'</WQL>
<Timeout value="90" />
<RowLimit value="20" />
<TypeName>WMI</TypeName>
<SourceScannerId value="55" />
</Scanner>
</Scanners>
<Description>https://social.technet.microsoft.com/Forums/office/en-US/5fff9c80-6206-49ba-addc-f6a1e63e78f3/how-to-export-a-list-of-failed-windows-updates-on-a-server?forum=winserverpowershell</Description>
<ScanProfileId value="24" />
<Name>WMI - Failed Updates</Name>
<ScheduleTriggerSet name="ScheduleTriggers">
<Triggers type="list" />
</ScheduleTriggerSet>
</ScanProfile>
</AdminArsenal.Export>
@chillware
Copy link

Hi! Any chance you can update this? The scan seems to work, but the report doesnt. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment