It’s Friday and it’s sunny in my neighborhood, which means it is blog posting time! Let’s talk about WMI filters today, shall we?
If I have WMI Filters and Group Policy Preferences targeting, do they cancel out? Does one have precedence? Will the world explode?
My answers are: No, Yes, and Maybe someday (but that’s more a Stephen Hawking conversation than a @superlilia blog post).
WMI Filters apply to the GPO as a whole; GP Preferences targeting is per Preferences item. That is, per drive mapping, per shortcut, per printer, per power plan.
Edit a GPO, create multiple Preferences items and target each of them differently. Let’s say, you’re targeting Power Plans; you want the Power Plans to be applied only if it’s business hours (Monday-Friday from 9am-5pm).
All of those items are in one GPO with a WMI filter – this will evaluate whether or not the GPO should be applied to the computer it is being pushed out to. For example, only for XP machines.
The order will be evaluate WMI filter first, then GP Preferences targeting. If the WMI filter says this GPO won’t be applied to the computer, then the Preferences items won’t even be evaluated. Get it? They’re inside the GPO, if the GPO doesn’t apply to that computer, it doesn’t matter what’s inside.
GP Preferences targeting can evaluate much more than just computer attributes: date/time, local security group membership, language, and 25 other filtering options.
Example WMI filters:
Operating system: Only target computers running Windows XP Professional.
Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows XP Professional"
Example GP Preference target:
You could apply the Preferences targeting to one of your Power Plans within a GPO, and the WMI Filter to the GPO as a whole. Then, if the computer is running XP, the WMI filter will pass and the Preferences targeting will be evaluated for this item only. If it’s Monday through Friday between 9am and 5pm, the Preferences item will be applied.
Read more about WMI Filters here on Technet.
Final note: where there’s overlap, I always suggest using Preferences targeting. It’s more granular, the reporting is much easier, and it runs faster than WMI filters. For more on WMI filter speed, read here.
Hope this helps,
LiliaG, Group Policy PM