HOWTO: Leverage Group Policies with WMI Filters

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

Author:
Francis Ouellet MVP
COMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.
Abstract
WMI filters are used to determine the scope of Group Policies based on computer attributes such as the operating system, free hard disk space or brand and model.  
 
WMI filters only apply on Windows XP and Winsows Server 2003 computers. WMI filters are ignored on earlier versions of Windows. In order to be able to filter policies you will need at least one domain controller running Windows Server 2003 in your environment.
Step One : Install the Group Policy Management Console (GPMC) SP1
Download the GPMC SP1 from .
 
Install the GPMC SP1 according to the setup instructions.
Step Two: Create a WMI filter
Once installed open the GPMC under Administrative Tools
Expand the domain under which you want to create a WMI Filter
Right-Click the WMI Filter object and select New…
Type in a Name and a friendly description for your new filter
The current namespace should be root\CIMv2; This is the most common namespace for WMI queries. All Win32_* classes are located.
Step Three: Create your WMI query using WQL
In the Query textbox write your query.
Here is a query that would return true if the C: drive has at least 100MB free
 
Select * from Win32_LogicalDisk where FreeSpace > 104857600 AND Caption = "C:"
 
How to determine all of the Win32_* available classes and properties?
 
Download the WMI Tools available at
 
Using the WMI Object browser you can search for classes and even see all the different properties.
Step Four: Assign a WMI Filter to a Group Policy
Step Four: Assign a WMI Filter to a Group Policy
 
Select the Group Policy Object and in the right pane, in the WMI Filtering section click the drop down menu and select the WMI Filter you have just created.
The Group Policy will only be applied if the WMI Filter assigned returns true.
Related websites
Group Policy Processing Stops After You Apply a WMI Filter to a GPO

 
WMI Filters overview

 
Managing WMI security

 
Windows Management Instrumentation (WMI)

 
WMI Classes
About the author.
The author is a Windows system administrator located in Montreal, Quebec; He can be reached at francis@francisouellet.ca
Properties

Article ID: 555253 - Last Review: 02/08/2005 12:03:00 - Revision: 1.0

Microsoft Windows Small Business Server 2003 Standard Edition, Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems, Microsoft Windows Server 2003, Datacenter Edition, Microsoft Windows Server 2003, Enterprise Edition, Microsoft Windows Server 2003, Standard Edition, Microsoft Windows Small Business Server 2003 Premium Edition, Microsoft Windows Small Business Server 2003 Standard Edition

  • kbpubtypecca kbpubtypewp kbpubmvp kbhowto KB555253
Feedback