Getting All Machines Containing a Specific Software Package

So, Let’s say you need to see all machines that contain a specific software package, you can use sccm’s gui, or you can do it in SQL, where you can act on the results:

declare @LookupString as nvarchar 
set @LookupString = '%'
SELECT     vrs.Name0
FROM       v_r_system AS vrs 
JOIN   v_GS_INSTALLED_SOFTWARE AS VIS ON VIS.resourceid = vrs.resourceid 
JOIN  v_GS_SoftwareFile AS sf ON SF.resourceid = vrs.resourceid                         
WHERE     VIS.productname0 LIKE @LookupString
GROUP BY vrs.Name0



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s