IntuneHow-to

Device query in Intune: KQL answers about one device or your whole fleet

Run KQL in Intune against one Windows device in real time or across your fleet's inventory: licensing, permissions, the properties catalog policy and queries you can reuse.

Which laptops still have an unprotected volume? How many ARM64 devices do we own? Whose battery is worn out? Intune's device query answers questions like these with Kusto Query Language (KQL), either live against one Windows device or across the inventory your devices upload. In this post I'll cover licensing and permissions, set up inventory collection and give you queries you can paste and adapt.

How this guide is organised: Single device or many devices? → Prerequisites → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. Single device or many devices?. 2. Prerequisites. 3. Step-by-step (3 steps: Collect inventory with a properties catalog policy; Query a single device in real time; Query the whole fleet). 4. Verify. 5. Tips & gotchas. Toolbox: manage-bde -status, Devices › Device query, Managed devices › Query, LocalGroup, WindowsAppCrashEvent.1Single device ormany devices?2Prerequisites3Step-by-step4Verify5Tips & gotchas1Collect inventory with aproperties catalog policy2Query a single device inreal time3Query the whole fleetTOOLBOXmanage-bde -statusDevices › Device queryManaged devices › QueryLocalGroupWindowsAppCrashEventHow this guide is organised: Single device or many devices? → Prerequisites → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. Single device or many devices?. 2. Prerequisites. 3. Step-by-step (3 steps: Collect inventory with a properties catalog policy; Query a single device in real time; Query the whole fleet). 4. Verify. 5. Tips & gotchas. Toolbox: manage-bde -status, Devices › Device query, Managed devices › Query, LocalGroup, WindowsAppCrashEvent.1Single device or many devices?2Prerequisites3Step-by-step1Collect inventory with a properties catalogpolicy2Query a single device in real time3Query the whole fleet4Verify5Tips & gotchasTOOLBOXmanage-bde -statusDevices › Device queryManaged devices › QueryLocalGroupWindowsAppCrashEvent
At a glance: how this guide is organised · 3 steps · 5 key settings and tools

Status (October 2026): Device query is part of Intune Advanced Analytics. Besides the Intune Suite and the Advanced Analytics add-on, Microsoft now includes Advanced Analytics in Microsoft 365 E3 and E5, under the licensing change that began in July 2026. Check that the capability shows up in your tenant before you plan around it.

Single device or many devices?#

AspectDevice query (single device)Device query for multiple devices
DataLive: the query runs on the device when you select RunThe inventory each device last uploaded, refreshed roughly once a day
PlatformsWindows, Microsoft Entra joined or hybrid joinedWindows, macOS, iOS/iPadOS and corporate-owned Android Enterprise (dedicated, fully managed, work profile)
Device must be onlineYesNo
WhereThe device's Device query pageDevices › Device query
Best forTroubleshooting one device nowFleet trends and finding devices

Both work only with devices that are managed by Intune and marked as corporate-owned. Personal devices simply don't appear.

Prerequisites#

  • Licence for Intune Advanced Analytics (see the status note above). Also check the general Advanced Analytics prerequisites that Microsoft's device query pages point to.
  • Permissions: a custom Intune role that includes Managed devices › Query, plus permissions to see devices, such as Organization › Read and Managed devices › Read.
  • WNS for single-device queries: Intune uses Windows Push Notification Services to deliver the query and return results. If WNS is blocked, the query fails, and there's no way around it.
  • Inventory for fleet queries: Windows devices need a properties catalog policy (step 1). iOS/iPadOS, macOS and Android devices report inventory without one.

Step 1: Collect inventory with a properties catalog policy#

  1. Go to Devices › Manage devices › Configuration › Create › New policy, choose Windows 10 and later and the Properties catalog profile type.
  2. Add the properties you want to query, for example Battery, Bios Info, Cpu, Disk Drive, Encryptable Volume, Logical Drive, Memory Info, Network Adapter, Os Version, System Enclosure, Tpm, Video Controller and Windows Qfe.
  3. Assign it to your corporate Windows device groups.
  4. Allow time for the first upload. A device that hasn't uploaded yet doesn't cause an error; it's just missing from results. The device's Resource explorer view shows what it has sent.

Tip: Collect what you'll actually query. If a property isn't in the policy, its table comes back empty for those devices, which is easy to misread as "no matching devices".

Step 2: Query a single device in real time#

Open the device from Devices › All devices, select Device query, enter a query and select Run. Results come back while you wait, which makes this the tool for "what is true on this PC right now?" Unprotected volumes on this device:

KQL
EncryptableVolume
| where ProtectionStatus != "PROTECTED"

Processor details:

KQL
Cpu
| project Model, Architecture, CoreCount, LogicalProcessorCount

The single-device schema goes beyond inventory, with live entities such as Process, Certificate, LocalGroup, WindowsAppCrashEvent, FileInfo and WindowsRegistry; the last two take a file path or registry key as a parameter, so check Microsoft's schema reference for the exact syntax. Supported table operators are where, project, join, order by, top, take, distinct and count, along with comparison operators such as ==, contains and like.

Step 3: Query the whole fleet#

Go to Devices › Device query, write the query and run it. Every row carries a Device column, which is also what join matches on, and fleet queries can aggregate with summarize. Devices by processor architecture:

KQL
Cpu
| summarize DeviceCount = count() by Architecture

Unprotected volumes across the fleet, with the drive details alongside:

KQL
EncryptableVolume
| where ProtectionStatus != "PROTECTED"
| join LogicalDrive on Device

Batteries holding less than 60% of their design capacity, worst first:

KQL
Battery
| where DesignedCapacity > 0
| project Device, Model, CycleCount, HealthPercent = (FullChargedCapacity * 100) / DesignedCapacity
| where HealthPercent < 60
| order by HealthPercent asc

Devices with less than 8 GB of physical memory, a quick input for refresh planning:

KQL
MemoryInfo
| project Device, PhysicalMemoryGB = PhysicalMemoryTotalBytes / (1000*1000*1000)
| where PhysicalMemoryGB < 8

Verify#

  • Inventory is flowing: run the architecture query and compare the total with the number of corporate-owned devices in scope. A big gap usually means devices without the properties catalog policy, devices enrolled as personal, or devices that haven't uploaded yet.
  • Single-device query works: Cpu on an online device returns a result within seconds. If it times out, check that the device is online, corporate-owned and can reach WNS.
  • Results match reality: spot-check a device. For volumes, compare with manage-bde -status run from an elevated prompt on that device.

Tips & gotchas#

  • Fleet results are a snapshot. They reflect each device's last upload, so a fix deployed this morning may not show until tomorrow. Confirm on one device with a single-device query.
  • It's a KQL subset. Stick to the documented operators and functions; queries copied from Log Analytics may need trimming. For devices onboarded to Defender for Endpoint, advanced hunting answers a different set of questions.
  • Ownership matters. Fix devices wrongly marked as personal before you trust a count.
  • Keep WNS open. Proxies or firewalls that block it break single-device queries, along with Intune's push notifications that prompt devices to sync.
  • Act on the answers. Pair queries with Remediations to fix what you find, and use Graph PowerShell reports when you need scheduled exports.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)