How to query for installed software/version ?

Discussion in 'Parallels Mac Management for Microsoft SCCM' started by js2021, Feb 10, 2021.

  1. js2021

    js2021 Bit Poster

    Messages:
    2
    I am brand new to Parallels and have only a month of hands-on experience with SCCM. I need to make a Collection/Query that shows me all the Macs that have Google Chrome. The WQL query for Windows is:

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System
    inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId
    where SMS_G_System_INSTALLED_SOFTWARE.ARPDisplayName like "Google Chrome%"
    When I try to blend this query with the Parallels built-in query for Macs, I get zero results:

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System
    inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId
    where SMS_G_System_INSTALLED_SOFTWARE.ARPDisplayName like "Google Chrome%" AND
    (ClientVersion LIKE '%-PMA' AND OperatingSystemNameandVersion LIKE '%Mac OS X%')
    So is the data for Mac software inventory in a different table? Is there any documentation of the Parallels SCCM database schema?
    I need to find Macs that do and don't have Chrome. In the SCCM Resource Explorer, I know the data exists!
    upload_2021-2-10_18-23-29.png
     
  2. js2021

    js2021 Bit Poster

    Messages:
    2
    I've also tried .ProductName instead of ARPDisplayName, which ALSO returns Windows machines but still no Macs.
     
  3. Evgeny Smirnov

    Evgeny Smirnov Parallels Developers

    Messages:
    53
    Hello! The correct WMI class for this request is SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName. Please try this
    Code:
    select
      SMS_R_SYSTEM.ResourceID,
      SMS_R_SYSTEM.ResourceType,
      SMS_R_SYSTEM.Name,
      SMS_R_SYSTEM.SMSUniqueIdentifier,
      SMS_R_SYSTEM.ResourceDomainORWorkgroup,
      SMS_R_SYSTEM.Client
    from SMS_R_System
    inner join SMS_G_System_ADD_REMOVE_PROGRAMS
      on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceID
    where
      SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName LIKE "System Preferences"
      AND
      (ClientVersion LIKE '%-PMA' AND OperatingSystemNameandVersion LIKE '%Mac%')
    NOTE that the OS check is also changed because macOS 11 now appears as "macOS 11.0".
     

Share This Page