Query Details

Device Visualize Windows Versions

Query

// 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")

Explanation

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.

Details

Ugur Koc profile picture

Ugur Koc

Released: August 13, 2022

Tables

IntuneDevices

Keywords

Visualize,Windows,Versions,Devices,Connection,Intune,Last,Days,DeviceName,OSVersion,Piechart,Title,Build

Operators

IntuneDeviceswherecontainstodatetimeLastContactagosummarizearg_maxTimeGenerated*byDeviceNamecountOSVersionsortdescrenderpiecharttitle.

Actions