SCCM Report for 2 softwares registered in Add/Remove Programs

This report creates the output in the following format.



Computer 1Software 1Software 2
Computer 2Software 1Software 2
Computer 3Software 1Software 2
Computer 4Software 1
Computer 5Software 1Software 2
Computer 6Software 1Software 2
Computer 7Software 2
Computer 8Software 1Software 2


Query:

select sys.name0,(select distinct 'Software ARP1' from v_Add_Remove_Programs ARP where (ARP.ResourceID=SYS.ResourceID) and exists (select ARP.DisplayName0 where ARP.DisplayName0='Software ARP1') ),(select distinct 'Software ARP2' from v_Add_Remove_Programs ARP where (ARP.ResourceID=SYS.ResourceID) and exists (select ARP.DisplayName0 where ARP.DisplayName0='Software ARP2') )  from v_r_system sys inner join  v_FullCollectionMembership on sys.ResourceID=v_FullCollectionMembership.ResourceID where  v_FullCollectionMembership.CollectionID=@CollID

Prompt Query: Create a prompt with the variable CollID using the following query.

select CollectionID,Name from v_Collection

Here, replace Software ARP1 and Software ARP2 with your application add/remove programs name.

0 comments:

Post a Comment