Tuesday, June 10, 2025

CMPivot Join Query Example - SCCM / Intune

I find there are lack of query with joins example and created this from a need to see what model had the new version installed.  We deployed an application to a location and thought the issue was system type related.

Replace the bolded items with the actual names.

The first query is based on a specific naming convention.   

InstalledSoftware | where ProductName contains 'ProductName' and ProductVersion == 'ProductVersion' | join  kind=inner (Device | where Device contains 'DeviceName') | project  Device, Model, ProductName, ProductVersion

This query will return all devices that matches the product conditions.

 InstalledSoftware | where ProductName contains 'ProductName' and ProductVersion == 'ProductVersion' | join  kind=inner (Device) | project  Device, Model, ProductName, ProductVersion



No comments: