Forum Discussion
robmo
May 02, 2022Brass Contributor
Dynamic collection needed
Hi, I need a dynamic collection for an update that fails with error 0x800F080F(-2146498545). I cannot find a WQL attribute class that will help me identify computers with this failure. No problem wi...
- May 05, 2022Solution proposed by Justin3315 on https://social.technet.microsoft.com/Forums/en-US/cb676fe7-365b-49a6-80df-88d19ac9a1ca/create-collection-based-on-software-update-scan-status-last-error-code?forum=ConfigMgrCompliance#cb676fe7-365b-49a6-80df-88d19ac9a1ca
« It should work using the scan error you specified above but you may have to change the LastEnforcementMessageID and/or the Status values. »
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from sms_r_system inner join SMS_UpdateComplianceStatus on SMS_UpdateComplianceStatus.machineid=sms_r_system.resourceid where SMS_UpdateComplianceStatus.LastEnforcementMessageID = 11 and SMS_UpdateComplianceStatus.LastErrorCode = -2147023293 and SMS_UpdateComplianceStatus.Status = 2
Renald
Geraldo
May 05, 2022Copper Contributor
Maybe with an Configuration Baseline (Item - Script) and from Deployment - create New Collection - Non-compliant...
https://devblogs.microsoft.com/scripting/use-powershell-to-easily-find-information-about-hotfixes/
$val = gwmi -cl win32_reliabilityRecords -filter "sourcename = 'Microsoft-Windows-WindowsUpdateClient'" | where { $_.message -match '0x800F080F' }
if ($val -eq 0)
{
$Compliant = $true
}
if ($val -ne 0)
{
$Compliant = $false
}
$Compliant
Regards, G.
- DxRMay 05, 2022Iron ContributorSolution proposed by Justin3315 on https://social.technet.microsoft.com/Forums/en-US/cb676fe7-365b-49a6-80df-88d19ac9a1ca/create-collection-based-on-software-update-scan-status-last-error-code?forum=ConfigMgrCompliance#cb676fe7-365b-49a6-80df-88d19ac9a1ca
« It should work using the scan error you specified above but you may have to change the LastEnforcementMessageID and/or the Status values. »
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from sms_r_system inner join SMS_UpdateComplianceStatus on SMS_UpdateComplianceStatus.machineid=sms_r_system.resourceid where SMS_UpdateComplianceStatus.LastEnforcementMessageID = 11 and SMS_UpdateComplianceStatus.LastErrorCode = -2147023293 and SMS_UpdateComplianceStatus.Status = 2
Renald- robmoMay 05, 2022Brass ContributorThank you to everyone that responded! I went with Renald's suggestion and it's working as expected.