Skip Ribbon Commands
Skip to main content

Ondrej Sevecek's English Pages

:

Engineering and troubleshooting by Directory Master!
MCM: Directory

Quick Launch

Ondrej Sevecek's English Pages > Posts > GPO WMI filters using multiple queries work in AND relationship
September 08
GPO WMI filters using multiple queries work in AND relationship

There is always the AND/OR question pending about using more than a single WMI query inside a single Group Policy WMI filter. When you define a GPO WMI filter, you must specify at least one WMI query. If the query returns at least one result, the WMI filter is positive and the GPOs which use the WMI filter are applied.

If you define multiple WMI queries on a single WMI filter, all of the WMI queries must return at least one result in order to apply the relevant GPOs. Thus the mutliple WMI queries work in AND relationship. Each WMI query inside the common WMI filter can reference different WMI classes. Which is kind of useful.

If you need an OR relationship of more than a single WMI condition (query), you may define more separate WMI filters. Alternatively, if the required queries reference the same WMI class, you can combine the OR conditions together inside a single WMI query with the normal WQL OR keyword.

If you need to supply parallel conditions referencing different WMI classes, you will have to define different WMI filters and apply them to different Group Policy Objects (GPOs). The trick here would be to have the same policy settings configured in all the different GPOs while the different GPOs would apply to different computers. Although this method seems kind of untidy, this is the only way how to achieve OR relationship of multiple WMI queries, at least by my experience.

Comments

There are no comments for this post.

Add Comment

Sorry comments are disable due to the constant load of spam *


This simple antispam field seems to work well. Just put here the number.

Title


You do not need to provide any value this column. It will automatically fill with the name of the article itself.

Author *


Body *


Attachments