SOLVED

Dynamic collection needed

Brass Contributor

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 with a SQL query but I cannot figure out how to match the SQL views to attribute classes.

 

If someone could point out some attribute classes to look at, that would be appreciated. When I figure this out, I will post the solution that works.

 

Thank you!

Rob

4 Replies

@robmo This is not an officially supported method but you can get details using this method.
SQL query to WQL and WQL Query to SQL using https://www.anoopcnair.com/convert-wql-queries-to-sql-queries-using-sccm/

 

The best-recommended way to get the mapping my experience is using SCCM resource explorer as explained in one of the dynamic collection creation posts.

 

Example Try to get the mapping tip from resource explorer and build query based on that - How to Create SCCM Collection for Windows 11 Upgrade Compatible Devices.

@robmo 

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.

 

best response confirmed by robmo (Brass Contributor)
Solution
Solution proposed by Justin3315 on https://social.technet.microsoft.com/Forums/en-US/cb676fe7-365b-49a6-80df-88d19ac9a1ca/create-collec...

« 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
Thank you to everyone that responded! I went with Renald's suggestion and it's working as expected.
1 best response

Accepted Solutions
best response confirmed by robmo (Brass Contributor)
Solution
Solution proposed by Justin3315 on https://social.technet.microsoft.com/Forums/en-US/cb676fe7-365b-49a6-80df-88d19ac9a1ca/create-collec...

« 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

View solution in original post