Computer Performance, Windows Server 2003

Windows 2003 - Group Policy WMI Filters

WMI Filters for Group Policies

WMI Filters allow you to select only computers that meet your chosen criteria. Naturally, your Group Policy will only apply to the objects that match your filter. For example, you want to assign an .MSI package, however you are worried that disks on the XP workstations are full.  The answer is design and build a WMI filter.

WMI Filter Topics

  ‡

Creating WMI Filters

Building WMI filters is a multi skilled task.  You need to marry Group Policy skills with WMI knowledge.  You also need to research which of Microsoft's Win32_Classes are suitable for a WQL (Windows Query Language) query.  As far as Group Policy skills are concerned there is a two stage process, creating the filter with its WQL query, then assigning, or wiring up the filter to the appropriate Group Policy object.

WMI Filter for Group Policy

WMI Filter - Example 1

Below is a WMI filter which checks the free disk space on the C: drive.

 

SELECT * FROM Win32_LogicalDisk WHERE (Name = " C:") AND
DriveType = 3 AND FreeSpace > 20000000 AND FileSystem = " NTFS"

 

Note 1: DriveType value = 3 means a local disk
Note 2: 20000000 = 20MB.
Note 3: Your Keyword - Win32_LogicalDisk

Guy Recommends: WMI Monitor and Its Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.  Fortunately, Solarwinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

WMI Filter - Example 2

Here the WMI filter checks that the Operating System Name is XP and not Windows Server 2003.

 

Select * from Win32_OperatingSystem where Caption = " Microsoft Windows XP Professional"

 

Note 1: The Keyword is Win32_OperatingSystem

In truth you need to be a minor expert on WMI interface to create your own WMI filters from scratch.  To understand more about WMI and VBScript, check out this complete section.

Other ideas for criteria

  • Hardware - Pentium II or later
  • Service packs - SP1 or later.  Also for operating system hot fixes
  • DHCP - Service
  • Fancy criteria e.g. Registry settings or even event log ID
  • Time Zones

Where to apply WMI filters.WMI Filter for Group Policy in Windows 2003 GPMC

Once again, use the Microsoft GPMC to manage the Group Policy task.  The WMI filters have their own folder where you design and build the queries. 

Then you link the filter to the appropriate Group Policy via the drop down box on the very bottom right of the diagram.

How the filters work

A WMI filter consists a query that is checked against the WMI data on the target machine, the answer is always true or false.  Technically, you have created a separate object from the GPO in the directory. To apply it to a GPO, you link the filter to the GPO.  This is shown in the WMI filtering section on the Scope tab of a GPO.  Each GPO can have only one WMI filter; however the same WMI filter can be linked to multiple GPOs.

Note that these WMI filters only work on Windows XP and later operating systems. Windows 2000 and earlier clients just ignore any WMI filter and the GPO is always applied to all objects.  In effect it means that for these old clients the criteria are always true so there is no filtering.

°

Summary of WMI Filters

Here is a great idea to fine tune your Microsoft Group Policy and only apply the settings where there is sufficient disk space.  WMI filters are limited only be your imagination, or your knowledge of WMI's Win32_Classes.

TrainSignal - Recommended Training VideosTroubleshooting Group Policies is tricky

As an MCT trainer, I can thoroughly recommend TrainSignal because they provide practical hands on training.  In particular, I like the way TrainSignal cover all learning methods, instructor lead, video and of course text material.  You can either take one module, for example Group Policy or go for a combination of modules.  See more about Group Policy training here

See Also

 


Group Policy ebook Windows 2003 Download my 'Master Group Policies' ebook only $6.25

The extra features you get in your eBook include: Spreadsheet with over 850 policies.  Printer friendly version over Word A4 pages in Word.

 *


Google

Web  This website

Review of Orion NPMGuy Recommends: Orion's Network Performance Monitor (NPM)

Orion NPM is designed for detecting network outages.

Network-centric views (screenshot) make it easy to see what's working, and what needs your attention.

Download your free trial of Orion's network performance monitor

 

Home Copyright © 1999-2010 Computer Performance LTD All rights reserved

Please report a broken link, or an error.