GPO WMI Filter Trick – No clause and multiple query(s)

Hi everyone !

Today I wanted to share a tip for creating more complex group policy.

WMI filter come handy to target the needed computer in group policy. Adding a NOT LIKE clause like in SQL can be there important.

Creating multiple query help to make a full target.

Keep in note that in multiple query EACH query must be TRUE. So if you do two query, both need to be evaluated as TRUE for the filter to apply.

I will start with the NO clause. If inside your WMI filter you need to use a NO clause please remember that it must be wrote select * … WHERE NOT ….

An example that do a compare on the version;

select * from Win32_OperatingSystem WHERE NOT Version like “10.0.14393%”

Now time to talk on how to make multiple WMI check filter.

I would show an example of how it can be useful; if in example your GPO must target all Windows 10, except a LTSB version. That would look that way;

select * from Win32_OperatingSystem WHERE NOT Version like “10.0.14393%”

select * from Win32_OperatingSystem WHERE Version like “10.%” AND ProductType=”1″