Query Details

Device Visualize Device Compliance

Query

// Visualize device compliance (compliant, non-compliant, managed by Config Manager, not evaluated or in grace period) per week over time
IntuneDevices
| where TimeGenerated > ago (30d)
| summarize arg_max(DeviceName, *) by DeviceName
| where isnotempty(CompliantState)
| summarize ComplianceCount=count()by CompliantState
| render piechart 
    with (title="Device compliance")

Explanation

This query is designed to create a pie chart that shows the compliance status of devices over the past 30 days. It filters out devices with no compliance state data and counts the number of devices in each compliance state. The compliance states include compliant, non-compliant, managed by Config Manager, not evaluated or in grace period. The pie chart is titled "Device compliance".

Details

Ugur Koc profile picture

Ugur Koc

Released: August 13, 2022

Tables

IntuneDevices

Keywords

Visualize,Device,Compliance,ConfigManager,Time,IntuneDevices,TimeGenerated,DeviceName,CompliantState,ComplianceCount,Piechart,Title

Operators

IntuneDeviceswhereTimeGeneratedagosummarizearg_maxDeviceName*byisnotemptyCompliantStatecountComplianceCountrenderpiecharttitle.

Actions