DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 555253 - Last Review: February 8, 2005 - Revision: 1.0

Author: Francis Ouellet MVP
 

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 http://www.microsoft.com/windowsserver2003/gpmc/default.mspx.
 
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 http://www.microsoft.com/downloads/release.asp?releaseid=40804
 
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
http://support.microsoft.com/kb/814613/en-us
 
WMI Filters overview
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/entserver/wmifltr_default.asp
 
Managing WMI security
http://www.microsoft.com/resources/documentation/WindowsServ/2003/enterprise/proddocs/en-us/wmi_managing_security.asp
 
Windows Management Instrumentation (WMI)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_wmi.asp
 
WMI Classes
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_classes.asp

About the author.

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

APPLIES TO
  • 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
Community Solutions ContentCOMMUNITY 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.
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support