Using WMI filters in Group Policy

by Mitch Tulloch [Published on 12 July 2012 / Last Updated on 12 July 2012]

A tip on properly using WMI filters in Group Policy.

WMI filters can be used to define the scope of Group Policies based on computer attributes such as operating system, free hard disk space, brand and model, and so on.  But to use them properly you should use them sparingly and test the performance of the filters before using them in your production environment since they can cause delays in Group Policy processing if you use too many of them or make them too generic in nature.

For example, try and avoid the "select * from" approach when making WMI filter queries and instead try to only include the objects from the WMI class you need to evaluate your filter query.  Thus, instead of using something like this:

Select * From Win32_OperatingSystem where BuildNumber >= 7600 AND ProductType ='1'

use something like this instead:                                                      

Select BuildNumber, ProductType from Win32_OperatingSystem where BuildNumber >= 7600 AND ProductType ='1'

Mitch Tulloch is a seven-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization. For more tips by Mitch you can follow him on Twitter or friend him on Facebook.


See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Featured Links