大网数据广告活动
域与目录服务

WMI Group Policy filters don't work

· 52CE 我爱测

Describes an issue in which Windows 10 builds are excluded from WMI filter results.

This article provides a solution to an issue where Windows Management Instrumentation (WMI) Group Policy filters that compare Win32_OperatingSystem BuildNumber don't work as expected in Windows 10.

Applies to:   Windows 10 - all editions
Original KB number:   3119213

Symptoms

Consider the following scenario:

  • You want Group Policy to apply to Windows 8.1 and later versions of Windows.

  • You want to use Win32_OperatingSystem BuildNumber to do this.

  • You create the following WMI filter, based on known build numbers of Windows versions:

    "Select BuildNumber from Win32_OperatingSystem WHERE BuildNumber >= 9200 "
    
    Build number Windows version
    9200 Windows 8
    9600 Windows 8.1
    10240 Windows 10
    10586 Windows 10, version 1511
    14393 Windows 10, version 1607
    15063 Windows 10, version 1703
    16299 Windows 10, version 1709
    17134 Windows 10, version 1803
    17763 Windows 10, version 1809
    18362 Windows 10, version 1903

In this scenario, although you would expect the WMI filter to cause the Group Policy setting to apply to build number 9200 and later builds, Windows 10 builds are excluded.

Cause

This issue occurs because the data type for BuildNumber is String and not Integer. Therefore, 10*** < 9600.

Resolution

To fix this issue, use a filter that resembles the following example.

Note: There are several ways to force the string compare to return the result that you want. You can use any method that you prefer. The example is fully functional.

Select BuildNumber from Win32_OperatingSystem WHERE BuildNumber >= 10000 AND BuildNumber LIKE "%[123456789][0123456789][0123456789][0123456789][0123456789]%" OR BuildNumber >= 9200 AND BuildNumber LIKE "%[123456789][0123456789][0123456789][0123456789]%"

Data collection

If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for User Experience issues.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。