Windows Feature and Quality update reporting made precise and simpel with Defender for Endpoint.

Creating Windows update reports for management has always been somewhat of a tricky thing to do. It can be a real headacke having to explain yet again, why some devices have not been updated yet, especially in these hybrid times where some devices might be managed by Configuration Manager and other devices are managed by Intune. The reporting in Intune not aligning with the reports in Configuration Manager or with Entra ID for that matter. It all adds to the confusion and lack of trust in the reports. But what other options do we have? Well, if you are using Defender for Endpoint and are onboarding all of your devices, then you are in luck. By utilizing Defender for Endpoint’s “Advanced Hunting” functionality, you can use KQL to generate the report for you without relying on CM, Intune or Entra.

Let’s start out by taking a look at how it looks. I personally like the Pie charts as they are easy for everyone to understand. These are examples of the Pie charts that I put into my report:

Feature updates:

Quality Updates:

The great thing with these reports are that:

  • They only show the devices that has been active in the last 30 days (as default) which means you won’t have devices shown that has not been connected to your environment (Devices that you coulden’t possibly have managed). So people who are on leave and devices hidden in closets etc. won’t show in the report.
  • Defender updates the inventory about once and hour where Configuration Manager and especially Intune is much slower (Intune automatically syncs about every 8 hours). So you have much more up-to-date information here.
  • You can check up on your whole fleet in one view as Defender does not care from where the device is managed.
  • You can combine the Pie chart with the actual tabels that the report generates. This is especially helpfull for the Quality update report in order to narrow down the exact build versions deployed in your environmnet.

So, time for the good stuff. How to make these reports?

  1. Log in to the defender portal https://Security.microsoft.com
  2. Browse to Hunting -> Advanced hunting
  3. Click on “Create new”
  4. Type in one of the queries below (Feature update or Quality update)

Feature update:
Make sure to update the <Your Domain> to match your domain name in line 5 & 6. For example: “contoso.com”.

Quality update:
Make sure to update the <Your Domain> to match your domain name in line 5 & 6. For example: “contoso.com”.

When you run the query you will get a result similar to this:

If you click “Chart Type” (highlighted in red above) you can go and select a “Pie” chart and get your nice looking Pie chart directly in defender. Screen grab it and put it into your report.

Bonus:
If you only want to show device that are only AD joned or only AAD joined, you can play around with Line 4,5 and 6. But only have one of those lines active when you run the query.

Note that the query will also show you EOS_Status (End of Service) which is very handy for chasing the devices that are no longer being supported.

Also remember to update the KQL query when a new Feature update or a new Operating System is released.

Now go have fun with greating some simple, trustworthy and decent looking reports for your management :).

4 thoughts on “Windows Feature and Quality update reporting made precise and simpel with Defender for Endpoint.

  1. Tom Bernardini December 20, 2023 / 6:59 pm

    Keep getting the following error:
    Error message
    ‘where’ operator: Failed to resolve table or column expression named ‘DeviceInfo’

    Like

    • Matias December 22, 2023 / 5:36 pm

      Hi Tom, are you sure you are logged in with an account with enough permissions to read “DeviceInfo”? If you are on a test tenant ensure you are logged in to defender as “Global Administrator” and check if you are able to run the query.

      Like

  2. Tom Bernardini December 27, 2023 / 8:51 pm

    Hello Matias,
    I tried with two different GA accounts and same result. I did forgot to mention this last time, but the “DeviceInfo” on the 3rd line shows this error – “The name ‘DeviceInfo’ does not refer to any known table, tabular variable or function.(KS204)”

    Like

Leave a comment