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

x
?
Solved

WMI Filter Best Practice

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

Expert Comment

by:footech
ID: 40291424
In what context?  Group Policy?
0
 
LVL 38

Accepted Solution

by:
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.
http://technet.microsoft.com/en-us/library/cc779168(v=ws.10).aspx

There are some tools available to test WMI filters before you deploy it in production which will help you to make WMI query accurate
http://www.microsoft.com/en-us/download/details.aspx?id=7684
http://www.paessler.com/tools/wmitester

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.
0
 
LVL 65

Assisted Solution

by:RobSampson
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?
http://blogs.technet.com/b/heyscriptingguy/archive/2012/07/11/use-powershell-and-avoid-three-gotcha-s-with-wql-where-clauses.aspx

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
http://blogs.technet.com/b/askds/archive/2012/04/19/how-to-not-use-win32-product-in-group-policy-filtering.aspx

Try and always use the forward only enumerator, as it is a bit faster
http://technet.microsoft.com/en-us/library/ee198934.aspx

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.

Regards,

Rob.
0
 
LVL 38

Expert Comment

by:Mahesh
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.
0

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