Query Details
// Visualize Windows Versions and filtering for devices that had a connection to intune in the last 30 days. IntuneDevices | where OS contains "Windows" | where todatetime(LastContact) > ago(30d) | summarize arg_max(TimeGenerated, *) by DeviceName | summarize Versionen=count() by OSVersion | sort by Versionen desc | render piechart with ( title="Windows Build Versions")
This query is used to create a pie chart titled "Windows Build Versions". It filters and counts devices that have connected to Intune in the last 30 days and are running a version of Windows. The pie chart then displays the different versions of Windows these devices are running, sorted by the number of devices running each version.

Ugur Koc
Released: August 13, 2022
Tables
Keywords
Operators