AFAIK, this would require analyzing data from multiple views.
1. Identify installed software
Use the v_Add_Remove_Programs
or v_Add_Remove_Programs_64
views to get a list of installed applications:
SELECT DISTINCT MachineID, DisplayName, Version, Publisher
FROM v_Add_Remove_Programs
This provides a list of software installed on each machine.
2. Identify SCCM-managed deployments
Check the v_DeploymentSummary
and v_Program
tables to find applications deployed via SCCM:
SELECT DISTINCT dp.CollectionID, dp.PackageID, pr.ProgramName, ad.DisplayName
FROM v_DeploymentSummary dp
JOIN v_Advertisement ad ON dp.AdvertisementID = ad.AdvertisementID
JOIN v_Program pr ON dp.PackageID = pr.PackageID
This gives you a list of applications SCCM has deployed.
3. Find software not deployed by SCCM By performing a LEFT JOIN between these datasets, you can identify software installed on machines that were not deployed via SCCM:
SELECT arp.MachineID, arp.DisplayName, arp.Version, arp.Publisher
FROM v_Add_Remove_Programs AS arp
LEFT JOIN v_DeploymentSummary AS ds ON arp.DisplayName = ds.DisplayName
WHERE ds.DisplayName IS NULL
This will return a list of software that is installed but has no matching SCCM deployment record.
Alternatively, you can explore v_GS_SoftwareProduct
and v_MeteredSoftware
for additional insights into what software is being used and whether it was metered by SCCM.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin