WMI Group Policy filters that compare Win32_OperatingSystem BuildNumber don't work as expected on Windows 10
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 Windows Management Instrumentation (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
This issue occurs because the data type for BuildNumber is String and not Integer. Therefore, 10*** < 9600.
To fix this issue, use a filter that resembles the following example.
Note There are several ways to have 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 "%%" OR BuildNumber >= 9200 AND BuildNumber LIKE "%%"
Article ID: 3119213 - Last Review: 12/01/2015 01:49:00 - Revision: 1.0
- kbexpertiseadvanced kbsurveynew kbtshoot KB3119213