Windows Management Instrumentation Filters

  • For help on using Windows Management Instrumentation (WMI) filters, see How to.
  • To understand more about WMI filters, see Concepts.


How to...

  • Add a new WMI Filter to a Group Policy object
  • Delete a WMI Filter from a Group Policy object
  • Duplicate a WMI Filter in a Group Policy object
  • Import a WMI Filter to a Group Policy object
  • Export a WMI Filter from a Group Policy object
  • Sort WMI Filters in a Group Policy object
  • View a WMI Filter linked to a Group Policy object


Add a new WMI Filter to a Group Policy object

Microsoft Windows graphic

To add a new WMI Filter to a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Click This filter:, and then click Browse/Manage....
  7. Click Advanced.
  8. Click New to clear the Filter Name:, Description:, and Queries: fields.
  9. Type in information about the new filters you create.
  10. Click Save, and then click OK.

Notes

  • To perform this procedure, you must be a member of the Domain Admins group or the Group Policy Creator Owners group in Active Directory, or you must have been delegated the appropriate authority. As a security best practice, consider using Run as to perform this procedure.
  • XOX

Related Topics


Delete a WMI Filter from a Group Policy object

To delete a WMI Filter from a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Click This filter:, and then click Browse/Manage... .
  7. Click the filter that you want to remove.
  8. Click Advanced.
  9. Click Delete to remove the filter, click Yes, and then click OK.

Note

  • To perform this procedure, you must be the creator owner of the filter, a member of the Domain Admins group in Active Directory, or you must have been delegated the appropriate authority. As a security best practice, consider using Run as to perform this procedure.
  • XOX


Duplicate a WMI Filter in a Group Policy object

To duplicate a WMI Filter in a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Click This filter:, and then click Browse/Manage....
  7. Click Advanced.
  8. Click the filter that you want to duplicate.
  9. Click Duplicate.
  10. Click Save, and then click OK.

Note

  • XOX


Import a WMI Filter to a Group Policy object

To import a WMI Filter to a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Click This filter:, and then click Browse/Manage....
  7. Click Advanced, and then click Import.
  8. Select a MOF file that contains the WMI filter or filters you want to import.

Note

  • XOX


Export a WMI Filter from a Group Policy object

To export a WMI Filter from a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Click This filter:, and then click Browse/Manage....
  7. Click Advanced.
  8. Click the filter that you want to export, and then click Export.
  9. In File name type a name for the filter, click Save, and then click OK. WMI Filters are saved as .mof files.

Note

  • XOX


Sort the WMI Filters in a Group Policy object

To sort WMI Filters in a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Select This filter: then click Browse/Manage....
  7. Click Columns... to add column headers to the Manage WMI Filters dialog box.
  8. Select Description, Author, Change Date, or Creation Date to add any of these available column headers in the Display Columns to the Manage WMI Filters dialog box, and then click OK.

Notes

  • To display the WMI filters by category, click a category column headings to sort the WMI filters in the Manage WMI Filters dialog box.
  • To add, delete, duplicate, import, or export queries for the WMI filters, click Advanced in the Manage WMI Filters dialog box.


View a WMI Filter linked to a Group Policy object

To view a WMI Filter linked to a Group Policy object

  1. Open Active Directory Users and Computers.
  2. In the console tree, right-click the domain or organizational unit for which you want to set Group Policy.

    Where?

    • Active Directory Users and Computers [domain_controller_name.domain_name]
    • domain
    • organizational_unit
    • child_organizational_unit...
  3. Click Properties, and then click the Group Policy tab.
  4. Click an entry in the Group Policy object links list to select a Group Policy object, and then click Properties.
  5. Click the WMI Filter tab.
  6. Select This filter: then click Browse/Manage....
  7. Click Advanced to access the Edit Filters dialog box. The Edit Filters dialog box, appearing in the lower portion of the Manage WMI Filters dialog box, displays the syntax of the selected filter.
  8. To see the query syntax of another filter, click the name of that filter in the dialog box.

Note

  • XOX

For more information about using the WMI Query Language, see Microsoft Developer Network (MSDN).


Concepts

This section covers:

  • WMI Filters Overview


WMI Filters overview

WMI Filters allow an administrator to specify a WMI-based query to filter the effect of a Group Policy object, and are used for exception management. WMI Filters are written in WMI Query language (WQL).

The WMI Filter tab extension to the Properties page of a Group Policy object allows you to specify a WMI Filter for a given Group Policy object. The WMI Filter tab includes a Browse/Manage feature in which filters are created and edited. In addition, the Resultant Set of Policy (RSoP) snap-in also displays existing WMI Filters and can be used to specify alternate WMI Filters. For more information about Group Policy, see Group Policy overview

WMI SDK Common Information Model (CIM) Studio has numerous classes grouped by properties such as name or description and property name. Cim 2.0, alone, has 600 classes. You can use CIM studio to find a class to optimize and experiment with queries before creating a new filter.

For more information about developing WMI Filters, see Windows Management Instrumentation (WMI) SDK (http://www.microsoft.com/).

For information about WMI security, see Managing WMI Security.