Query Details

MDE Unified Agent Deployment Status

MDE Unified Agent

Query

let missingkb = 
// Details missing KBs Windows Server
DeviceTvmSoftwareVulnerabilities
| where SoftwareVendor == 'microsoft'
| where SoftwareName startswith 'windows_server'
| where isnotempty(RecommendedSecurityUpdate)
| distinct DeviceId, RecommendedSecurityUpdate, RecommendedSecurityUpdateId, SoftwareName
| join kind=leftouter (
    DeviceInfo
    | where isnotempty(OSPlatform)
    | where OnboardingStatus == 'Onboarded'
    | where isnotempty(OSVersionInfo)
    | summarize arg_max(Timestamp, *) by DeviceId)
    on $left.DeviceId == $right.DeviceId
| summarize MissingKBs = make_set(RecommendedSecurityUpdate) by DeviceName
| extend TotalMissingKB = array_length(MissingKBs);
DeviceInfo
| where OnboardingStatus == "Onboarded"
| where isnotempty(OSPlatform) 
| summarize arg_max(Timestamp,*) by DeviceName
| where OSPlatform contains "WindowsServer2012R2" or OSPlatform contains "WindowsServer2016"
| extend Agent = case(ClientVersion startswith "10.3720", "MMA", ClientVersion startswith "10.8", "UnifiedClient","Other")
| summarize by DeviceName, OSPlatform, OnboardingStatus,Agent, ClientVersion
| sort by ClientVersion asc
| join kind=leftouter  (missingkb)
on $left. DeviceName ==  $right.DeviceName

About this query

Explanation

The query is used to gather information about the deployment status of the Microsoft Defender for Endpoint - Unified Agent on downlevel servers. It provides details about the agent status, client versions, and operating system platforms. It also includes information about missing patches and security control compliance. The query results are summarized by operating system platform, total servers, total MMA agents, total Unified agents, and total other agents. Additionally, it provides an overview of the server OS versions and their patch status.

Details

Alex Verboon profile picture

Alex Verboon

Released: June 4, 2023

Tables

DeviceInfo

Keywords

DevicesIntuneUser

Operators

whereisnotemptysummarizearg_maxbycontainsextendcaseorstartswithmake_set_ifsortcountarray_lengthprojectletjoindistinctonmake_setdcountiftoint

Actions

GitHub