SCCM SQL queries

List all computers with a named application installed

SQL query for the Configuration Manager database that lists every computer with an application name you search for, with version and publisher.

LanguageSQL
What it does to the systemReads only. It changes nothing.

You often need to know which computers have one application. A license count, a security notice or an upgrade plan all start with this list.

The result shows each computer, the application name as Windows shows it, the version, the publisher and the install date.

SQL
-- Change the name. Keep the % signs to match any text before and after.
DECLARE @AppName NVARCHAR(255) = '%Google Chrome%';

SELECT DISTINCT
    rs.Name0         AS ComputerName,
    arp.DisplayName0 AS Application,
    arp.Version0     AS Version,
    arp.Publisher0   AS Publisher,
    arp.InstallDate0 AS InstallDate
FROM v_R_System rs
JOIN v_Add_Remove_Programs arp
    ON arp.ResourceID = rs.ResourceID
WHERE arp.DisplayName0 LIKE @AppName
ORDER BY rs.Name0, arp.DisplayName0;

How to use it

  1. Open SQL Server Management Studio and connect to the site database.
  2. Paste the query into a new query window.
  3. Change @AppName to the application name you want.
  4. Keep the % signs to match part of a name. Remove them to match the exact name.
  5. Run the query.

Good to know

  • v_Add_Remove_Programs joins the 32-bit and the 64-bit list. You do not need to query v_GS_ADD_REMOVE_PROGRAMS and v_GS_ADD_REMOVE_PROGRAMS_64 one by one.
  • The data comes from hardware inventory. A new install shows after the next hardware scan.
  • Applications that install for one user only do not show in this view.
installed software application v_Add_Remove_Programs v_R_System
✉

Get new articles in your inbox

SCCM guides, AI tools, automation tips — sent when published. No spam.