[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


WMI Filter Best Practice

Posted on 2014-08-28
Medium Priority
Last Modified: 2014-09-15
are there any do`s and dont`s? when to use and when not?
Question by:DukewillNukem
  • 2
LVL 41

Expert Comment

ID: 40291424
In what context?  Group Policy?
LVL 38

Accepted Solution

Mahesh earned 1000 total points
ID: 40291492
WMI Filters are best used by Group Policies
U can define if particular condition is True, apply GPO else skip.

WMI filters are best suited when you have single OU containing multiple objects (Say WinXP\ win 7 \win8 computers) underneath multiple OUs, in that case it is easy to put GPO on top level OU and apply WMI filter on GPO to apply specific policy to specific objects
For Ex: specific registry you want to apply on to windows XP machines only you can apply policy with registry settings which will apply to WinXP machines only based on WMI query

Do not use multiple WMI filters \ queries in single GPO, it will hamper performance because every WMI filter will be evaluated against condition and if it proved to be true, then only GPO will apply and this may increase startup \ logon time

As far as possible you should keep your GPO structure simple and use WMI filters only when it is really required, there are other options also available which you can explore like security filtering.

There are some tools available to test WMI filters before you deploy it in production which will help you to make WMI query accurate

finally when you cannot segregate your AD objects in separate OUs due to some limitations and you want to apply specific policy to specific objects based on matching criteria, WMI filters are best friend.
LVL 65

Assisted Solution

RobSampson earned 1000 total points
ID: 40291493
There aren't really best practice processes for WMI, but there are some gotchas that can prevent them working the way you expect, which are described here:
Gotcha #1: What does that value look like?
Gotcha #2: What’s the property name I need?
Gotcha #3: What does the operator look like?

The one don't I try to avoid is using the Win32_Product class to query installed software
How to NOT Use Win32_Product in Group Policy Filtering

Try and always use the forward only enumerator, as it is a bit faster

I also don't use CIM_DataFile as it can be very slow, and the syntax is very confusing to get right.

And lastly I would say test, test, test with as many scenarios you can.


LVL 38

Expert Comment

ID: 40291502
One more thing with GP preferences you can use item level targeting more effectively rather than WMI filters.
GP preferences item level targeting use WMI queries only but with more control.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question