Query Details
Description: iOS Devices that do not support the latest OS version. Example with Version 17.2.1. Adjust the version accordingly. Query: IntuneDevices | where OS contains "iOS" | extend VersionArray = split(OSVersion, ".") | extend MajorVersion = toint(VersionArray[0]), MinorVersion = toint(VersionArray[1]), PatchVersion = toint(VersionArray[2]) | where MajorVersion < 17 or (MajorVersion == 17 and MinorVersion < 2) or (MajorVersion == 17 and MinorVersion == 2 and PatchVersion < 1) | project DeviceName, OS, OSVersion
This query is looking for iOS devices that do not have the latest OS version. It splits the OS version into its major, minor, and patch versions, and then checks if the major version is less than 17 or if the major version is 17 but the minor version is less than 2, or if the major version is 17, the minor version is 2, but the patch version is less than 1. It then projects the device name, OS, and OS version.

Ugur Koc
Released: January 10, 2024
Tables
Keywords
Operators