SCCM SQL Query for Software not in Add Remove Programs

Last updated on September 25th, 2021 at 08:48 pm

()

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.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 450 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.

Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.