If you have been working with GPO in a Windows environment for any amount of time, then almost surely you have been presented with the enigma of creating WMI filters to segregate machine types. In our case this would be Desktop vs. Laptop. We realize there are many ways to skin this cat and I can assure you we have tested them all. In this article we are going to show you our solution on how to build WMI filters to apply to our GPO policies. First you will need to open your Group Policy Management Console. Once opened, you will need to expand all the entries and find WMI Filters. Right click WMI Filters and select new. You will be presented with the dialog shown to the left. There are a couple of steps to get our filter built. In step 1 of the dialog we will want to name the Filter “Desktops”. Next in step 2 we will put a description like “Desktop Filter Policy”. The last step is creating the actual queries that will select the Desktops by clicking step 3 which is the “Add” button. This will open the WMI Query dialog. In our case we are using 2 queries. The first is to filter down to Windows 7/8/8.1 Machines and the second is for finding the desktops based on memory form factor. Below are the desktop and laptop filter queries. Obviously for the Laptops, you will need to create a new WMI Filter by repeating the steps above.
Desktop Filter Queries
SELECT * FROM Win32_OperatingSystem WHERE (Version LIKE "6.1%" OR Version LIKE "6.3%") AND ProductType = "1" SELECT * FROM Win32_PhysicalMemory WHERE (FormFactor != 12)
Laptop Filter Queries
SELECT * FROM Win32_OperatingSystem WHERE (Version LIKE "6.1%" OR Version LIKE "6.3%") AND ProductType = "1" SELECT * FROM Win32_Battery WHERE Availability != 0
If everything was configured step-by-step using the above article, you should have two WMI Filter rules that look like the images below.
Thank you so much for this post I was looking for this.