Query Details

Count devices based on OS version information

Count Devices Based On Osversion

Query

DeviceInfo
// Define timerange below
| where TimeGenerated > ago(90d)
| summarize arg_max(Timestamp, *) by DeviceName
| summarize DeviceCount = dcount(DeviceName) by OSVersionInfo
| sort by DeviceCount asc

About this query

Count devices based on OS version information

Description

The following queries counts the devices onboard MDE based on the OS version information.

Microsoft 365 Defender

DeviceInfo
// Define timerange below
| where Timestamp > ago(90d)
| summarize arg_max(Timestamp, *) by DeviceName
| summarize DeviceCount = dcount(DeviceName) by OSVersionInfo
| sort by DeviceCount asc 

Microsoft Sentinel

Versioning

VersionDateComments
1.026/07/2022Initial publish
1.120/05/2023Transformed to template, minor changes

Explanation

This query counts the number of devices onboard Microsoft 365 Defender or Microsoft Sentinel based on their operating system (OS) version information. It retrieves the device information within a specified time range, groups the devices by their OS version, and then calculates the count of unique devices for each OS version. The results are sorted in ascending order based on the device count.

Details

Michalis Michalos profile picture

Michalis Michalos

Released: August 14, 2023

Tables

DeviceInfo

Keywords

DevicesIntuneUserOSVersionInfo

Operators

| wheresummarizearg_maxbydcountsortasc

Actions

GitHub