Alert icon Keyboard navigation enabled.
Alert icon TAB or Shift+TAB to navigate across. Down ↓ to open menu. ESC to close menu.
Alert icon Down ↓ to select section. Right → to activate. Up ↑ / Down ↓ / Tab to traverse all. ESC to exit.
BeyondTrust
Skip to content Use space or enter to skip.

What can we help you find today?

Instant Results
  • Website Results
  • Technical Documentation

Filter Options

Focus your search

Filtering by

Your recent searches:

Contact Us Chat with Sales Get Support
  • English
  • Deutsch
  • français
  • español
  • 한국어
  • português
  • Home
  • Resources
  • Blog
  • Active Directory Group Policy and WMI Filters current page
Link copied

Active Directory Group Policy and WMI Filters

Oct 20, 2017
Author:
Mark Austin
Blog banner default
Active Directory Group Policy and WMI Filters
Mark Austin

The scope of a Group Policy Object (GPO) can be controlled with WMI filters, based on criteria such as operating system version or hardware specifications. A WMI filter consists of one or more queries, and if all queries evaluate to true then the GPO linked to the filter will be applied.

WMI queries are composed using the WMI Query Language (WQL), which is a SQL-like language. Queries can be combined with logical operators and each query is executed against a particular WMI namespace. When you create a query, you must specify the namespace. The default namespace is root\CIMv2, which is appropriate for most WMI queries.

The WMI filter is a separate object from the GPO in the directory. To apply a WMI filter to a GPO, you link the filter to the GPO, which is shown in the WMI filtering section on the scope tab of a GPO in GPMC. A GPO can only have a single WMI filter, but the same WMI filter can be linked to multiple GPOs. WMI filters are evaluated on the target computer and applied whenever a Group Policy update is triggered.

Example 1 – Checking the Operating System Version

The Win32_OperatingSystem class is used to query operating system information. For instance, the following query can be used to check the operating system is Windows 7 or above:

Select * from Win32_OperatingSystem where Version >= 6.1

The above query will also include Windows Server 2008 R2, but we can refine this query and check the ProductType to restrict the query to desktop operating systems:

Select * from Win32_OperatingSystem where Version >= 6.1 and ProductType = 1

Example 2 – Checking the System Type

The Win32_ComputerSystem class is used to query the system type. For instance, the following query can be used to check for a mobile system:

Select * from Win32_ComputerSystem where PCSystemType = 2

Latest Posts
  • Hooked on Identity (Part 2): Abusing OAuth Trust Boundaries in Okta
    Jun 12, 2026 Hooked on Identity (Part 2): Abusing OAuth Trust Boundaries in Okta
    Blog
    7m
  • Hooked on Identity: Abusing SAML Assertion Inline Hooks in Okta
    Jun 9, 2026 Hooked on Identity: Abusing SAML Assertion Inline Hooks in Okta
    Blog
    6m
  • Joining Project Glasswing: Securing the Privilege Backbone of the AI Era
    Jun 8, 2026 Joining Project Glasswing: Securing the Privilege Backbone of the AI Era
    Blog
    5m
  • The Most Common & Most Dangerous Types of Shadow IT
    Jun 5, 2026 The Most Common & Most Dangerous Types of Shadow IT
    Blog
    19m
  • 14 Password Management Best Practices
    May 28, 2026 14 Password Management Best Practices
    Blog
    12m
Related
  • What is Persistence in Cybersecurity and How Do You Stop an Advanced Persistent Threat (APT)?
    Jun 6, 2023 What is Persistence in Cybersecurity and How Do You Stop an Advanced Persistent Threat (APT)?
    Blog
    1m
  • Is Biometric Security the Solution to Identity Protection?
    Jan 14, 2016 Is Biometric Security the Solution to Identity Protection?
    Blog
    1m
Share this Article
  • Link
Stay up to Date
Get the latest news, ideas, and tactics from BeyondTrust. You may unsubscribe at any time.

Keep up with BeyondTrust

Customer Support Get Started
  • LinkedIn
  • X
  • Facebook
  • Instagram
  • Add BeyondTrust as a preferred source on Google
  • Privacy
  • Security
  • Manage Cookies
  • Do Not Sell My Data
  • WEEE Compliance

Copyright © 2003 — 2026 BeyondTrust Corporation. All rights reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust Corporation is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.

Prefers reduced motion setting detected. Animations will now be reduced as a result.