Home › Microsoft Intune › 0x87D1339F

Microsoft Intune · 0x87D1339F · Windows 11 23H2

Intune Compliance Policy Evaluation Timeout (0x87D1339F) - Windows 11 23H2

WMI query for compliance policy timed out due to excessive duration; check WMI health and review logs.

Error Details

FactValueSourceNote
Exact error string0x87D1339FIntuneManagementExtension\Logs\AgentExecutor.log-> WMI query timeout
Affected OS build rangeWindows 11 23H2Device compliance settings in Intune
Registry key involvedHKLM\SOFTWARE\Microsoft\Windows Management InstrumentationWindows Registry Editor-> WMI health
Relevant service/endpoint URLhttps://graph.microsoft.com/v1.0/deviceManagement/complianceManagementCapabilitiesIntune API documentation
Log line signatureWMI query for compliance policy timed out after 300 seconds.AgentExecutor.log

Log Files to Check

What This Error Actually Means

The error code 0x87D1339F is raised by Microsoft Intune's compliance management component, specifically within the context of evaluating device compliance policies on a Windows 11 system. The issue arises when an attempt to query the Windows Management Instrumentation (WMI) service for compliance policy data times out after exceeding the threshold limit of 300 seconds. This timeout is critical because it indicates that the WMI service or its underlying queries are experiencing significant delays, which can be indicative of a broader system health issue affecting Intune's ability to enforce and monitor policies on the device.

Affected Versions and Scope

This error specifically targets devices running Windows 11 23H2. It is important to note that while this issue may appear in other builds, it has been most commonly observed within this specific OS build range due to changes in WMI query performance or configuration settings unique to Windows 11 23H2. The error does not affect devices running earlier versions of Windows 10 or later versions of Windows 11 that have not yet reached the same update cycle as 23H2.

Where To Look First: Logs and Event IDs

To diagnose this issue, start by examining two specific log files: Within these logs, you should look for the exact log line indicating a WMI query timeout: "WMI query for compliance policy timed out after 300 seconds." Additionally, review Windows Event Viewer for events related to WMI and Intune management. Specifically, check for event IDs 12 under the "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" log, which can provide additional context about WMI operations.

Root Causes

WMI Service Performance Degradation

This is often caused by a slow or unresponsive WMI service. This issue might be due to heavy system load, corrupted WMI repository, or excessive WMI queries from other services. To distinguish this cause, check the wmi_logs.txt for repeated errors or warnings related to query execution.

Inefficient Query Design in Compliance Policies

Sometimes, overly complex or poorly optimized compliance policies can lead to long-running WMI queries. Review the policy configuration and ensure that it is not unnecessarily querying large datasets or performing resource-intensive operations.

Network Latency Issues

If your organization's network infrastructure experiences high latency, this could cause delays in communication between Intune and devices, leading to timeouts. Check for network connectivity issues by pinging https://graph.microsoft.com/v1.0/deviceManagement/complianceManagementCapabilities.

Fix Procedure

  1. First, ensure that the WMI service is running without errors. Use PowerShell cmdlet to check its status:

    Get-Service -Name "Winmgmt"

    If it's not running, start and enable it with:

    Start-Service -Name "Winmgmt"
    Set-Service -Name "Winmgmt" -StartupType Automatic
  2. To optimize WMI performance, review the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Management Instrumentation. Look for parameters that might be causing delays and adjust them accordingly.

    For example, you can modify the AllowRemoteCMCIRequests value to allow remote management:

    New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Management Instrumentation" -Name "AllowRemoteCMCIRequests" -Value 1 -PropertyType DWORD
  3. To further diagnose the issue, run a WMI connection test using PowerShell:

    Test-WmiConnection -ComputerName "." -Namespace "root\cimv2"
  4. If network latency is suspected, use the following cmdlet to check connectivity and performance:

    Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/deviceManagement/complianceManagementCapabilities" -Method Get
Be cautious when making changes to the WMI service or registry keys, as incorrect modifications can disrupt device functionality and enrollment.

Error Code Variants

CodeDescription
0x87D1339FWMI query for compliance policy timed out after 300 seconds.
0x87D13400WMI service not responding within expected timeframe.
0x87D1339EInvalid WMI query syntax or malformed request.

Verification

After implementing the fixes, verify that the issue has been resolved by checking for the following:

Prevention

To prevent recurrence of this issue, consider implementing a baseline policy for WMI health checks and performance tuning. Additionally, regularly review and optimize your compliance policies to ensure they do not contain overly complex or resource-intensive queries.
A useful shortcut is to use the Get-WinEvent cmdlet with specific filters to quickly identify problematic events related to WMI operations.
By following these steps, you can effectively diagnose and resolve issues related to WMI query timeouts in Microsoft Intune for devices running Windows 11 23H2.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.