Change built in report "Computers with specific software registered in add remove programs" to show computers without the software

Chris 221 Reputation points
2023-01-27T19:50:50.1266667+00:00

I want to edit a canned report that gives me every computer in a collection with a specific software to give me every computer in a collection WITHOUT a specific software.

How do I do this?

This is the report I want to edit:

1

This query will give me EVERY computer in configuration manager without this software, but I don't know how to make it do it in a specific collection which is what I need so was hoping I could get some help

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 like '%Lightspeed Filter Agent%')

Below is the query of the canned report which lets me enter in the collection as well as a software and version. Was hoping to combine the above query into this one and make it work, but couldn't figure it out.

Select DISTINCT sys.Netbios_Name0, fcm.SiteCode,  sys.User_Domain0, sys.User_Name0, sys.Operating_System_Name_and0, arp.DisplayName0, arp.Version0 
FROM fn_rbac_R_System(@UserSIDs)  sys 
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID  
JOIN v_FullCollectionMembership fcm on sys.ResourceID=fcm.ResourceID 
WHERE dbo.fn_RemoveNonPrintableChars(arp.DisplayName0) like dbo.fn_RemoveNonPrintableChars(@filterwildcard) and fcm.CollectionID=@CollID and arp.Version0 like '%' + @Version + '%'

Any idea on how to do this?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Garth Jones 1,666 Reputation points MVP
    2023-01-27T22:59:53.1466667+00:00
    0 comments No comments

  2. AllenLiu-MSFT 49,311 Reputation points Microsoft External Staff
    2023-01-30T02:31:09.3566667+00:00

    Hi, @chris

    Thank you for posting in Microsoft Q&A forum.

    Here is the query that you can filter by the collection ID. Replace the CollectionID with your collection ID.

    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
    
    JOIN v_FullCollectionMembership fcm on sys.ResourceID=fcm.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 like '%Lightspeed Filter Agent%')
    
    and CollectionID = 'xxxxxxxx'
    
    

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

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