How do I limit software in Add Remove Programs to specified subnets?

Here is one solution to a recent question.  How do I limit the list of computers with specified software listed in add/remove programs to specific subnets?  Note this query would be modified based on adding or removing the display name or the subnets following the IN operator.

SELECT ARP.DisplayName0 AS [Display Name], ARP.Version0 AS Version, dbo.v_RA_System_IPSubnets.IP_Subnets0 AS [IP Subnet],
               COUNT(DISTINCT ARP.ResourceID) AS Count
FROM  dbo.v_Add_Remove_Programs AS ARP INNER JOIN
               dbo.v_RA_System_IPSubnets ON ARP.ResourceID = dbo.v_RA_System_IPSubnets.ResourceID
WHERE (ARP.DisplayName0 IN ('Microsoft Office Professional Edition 2003', 'Microsoft Office Standard Edition 2003', 'Microsoft Office Enterprise 2007'))

AND
(dbo.v_RA_System_IPSubnets.IP_Subnets0 IN ('192.168.88.0', '192.168.89.0'))
GROUP BY ARP.DisplayName0, ARP.Version0, dbo.v_RA_System_IPSubnets.IP_Subnets0
ORDER BY [Display Name], Version

Published Tuesday, August 31, 2010 4:52 PM by sthompson

Comments

No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems