SCCM SQL Query for Software not in Add Remove Programs

sccm logo 600x400
System Center Logo

Table of Contents

Estimated reading time: 2 minutes

If you are looking for an SCCM SQL query to create a report to search for machines which do not have a particular software installed, you can use the following:

Select Distinct
 sys.Netbios_Name0,
 sys.User_Domain0,
 sys.User_Name0
FROM
 v_R_System sys
JOIN v_Add_Remove_Programs arp
 ON sys.ResourceID = arp.ResourceID
WHERE
 sys.ResourceID not in
 (select sys.ResourceID
 from
 v_R_System sys
 JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
 WHERE
 DisplayName0 = @displayname)

Then you can use the variable @displayname to choose from a drop down of software that is in the SCCM database pulled from client machines. The query you can use for that is:

select
 DisplayName0
 from
 v_Add_Remove_Programs

You should be able to use these to create a report that will prompt for a selection from all the available data.

More Queries

Our full range of SQL and WQL Collection queries are available here.

Feedback

If you have any questions or feedback about this post, or if you would like us to create any queries for you, please go ahead and leave us a message below in the comments section and we will get back to you as quick as we can.

Click to rate this post!
[Total: 1 Average: 5]

Share this content:

Avatar for Andrew Armstrong

About Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by Andrew Armstrong

Leave a Reply

Your email address will not be published. Required fields are marked *