In today’s article, we will identify the cause and then provide a resolution for the Windows Management Instrumentation (WMI) group policy filters, which compare Win32_OperatingSystem BuildNumber, does not work as expected on Windows 10.
Windows Management Instrumentation (WMI) is Microsoft’s implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards of the Distributed Management Task Force (DMTF) which is a set of Microsoft specifications to consolidate the management of devices and applications in a network from Windows computer systems.
WMI allows scripting languages (such as VBScript or Windows PowerShell) to manage personal computers and Microsoft Windows servers, both locally and remotely. WMI is preinstalled in Windows 2000 and newer Microsoft operating systems.
WMI also supports actions such as configuring security settings, setting and changing system properties, setting and changing permissions for authorized users and groups, assigning and changing drive labels, scheduling processes to run at specific times, backing up the object repository, and enabling or disabling error logging.
WMI Win32_OperatingSystem BuildNumber Group Policy Filter Does Not Work
You experience this problem based on 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. And you create the following Windows Management Instrumentation (WMI) filter:
“Select BuildNumber from Win32_OperatingSystem WHERE BuildNumber >= 9200 “
Based on the known build numbers of Windows versions, as shown in the table below:
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 expect the WMI filter to cause the Group Policy setting to be applied to build number 9200 and later, versions of Windows 10 are excluded.
According to Microsoft, this problem occurs because the data type for BuildNumber is String and not Integer. Therefore, 10 *** <9600.
To resolve this problem, use a filter that resembles the following example:
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]%"
Note: There are several ways to force the string to compare to return the desired result. You can use any method you prefer. The example is fully functional.
I hope this helps you!