This example uses a WMI filter to apply a policy to Windows Server 2008R2 or Windows 7 systems.
This is particularly useful in a multiple OS environment where OU’s may be of a hieratical or organised structure but include mixed platforms.
select * from Win32_OperatingSystem where Version like “6.1%” and ProductType = “1”
Version numbers that can be used are shown below. The % symbol is a wildcard character that is used to represent other characters that may follow, i.e. 6.1% would include 6.1, 6.11, 6.112 etc.
Windows Server 2008 R2 or Windows 7 – 6.1%
Windows Server 2008 or Windows Vista – 6.0%
Windows Server 2003 – 5.2%
Windows XP – 5.1%
Windows 2000 – 5.0%
The product type number can consist of any of the following.
Client versions of Windows – 1
Server versions of Windows that are operating as a domain controller – 2
Server versions of Windows that are operating as member servers – 3
Creating a WMI filter and applying it to a policy
1) Open the Group Policy Management tool
2) Navigate to WMI filters, right click > new
3) Give the filter a relevant name
4) Click Add and enter the query shown above in the query text field
5) Click OK to save the WMI filter
6) Navigate to, or create, the GPO to which the filter will be applied
7) Within the Group Policy Management tool navigate to the Scope tab > WMI Filtering. Select the filter previously created.