SCCM collection query to get Software inventory failed devices

Boopathi S 4,036 Reputation points
2026-08-27T05:42:00.91+00:00

Hello Team,

Please share the SCCM collection query to get Software inventory failed devices

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments

Answer accepted by question author
Marcin Policht 106.8K Reputation points MVP Volunteer Moderator
2026-08-27T11:09:54.26+00:00

For an SCCM/MECM device collection that identifies computers where Software Inventory has not successfully reported recently, you can use the following query:

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_G_System_LastSoftwareScan on SMS_G_System_LastSoftwareScan.ResourceID = SMS_R_System.ResourceID where SMS_G_System_LastSoftwareScan.LastScanDate < DateAdd(dd,-7,GetDate())

This identifies devices whose last reported Software Inventory scan is older than seven days. You can change -7 to another value, such as -3 or -14, depending on how many days you want to allow before considering the Software Inventory scan overdue.

If by "failed" you specifically mean the SCCM client reports the Software Inventory cycle as failed, rather than simply having an old or missing inventory timestamp, the collection needs to use SCCM client status/state-message information instead of LastSoftwareScan.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.