Active Directory

Group Policy Targeting: Security Filters, WMI, and Preferences

The Back Room Tech Staff · Edited by Aseem Kishore
19 min read

The Back Room Tech is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

A Group Policy Object can apply while one preference item never appears. Security and WMI filters control the whole GPO. Item-level targeting controls one preference item. That difference decides where you start looking.

Use security filtering for account membership, WMI for computer conditions, and preference targeting for one setting. This lab walkthrough uses Windows Server management tools, an existing Active Directory domain, and two disposable domain-joined Windows computers. You’ll compare harmless registry markers and verify removal before cleanup, validating each outcome directly on your own builds.

Prepare an Isolated Windows Group Policy Targeting Lab

This walkthrough uses Group Policy Management Console (GPMC) on a Windows Server management host with two domain-joined Windows clients. Console controls, dialog labels, and preference removal options can vary across Windows Server and client builds, so check the available options on your systems before relying on them.

You’ll need:

  • An existing Active Directory Domain Services domain with working domain connectivity.
  • A Windows Server management computer with a desktop interface.
  • Two disposable, domain-joined Windows computers named LAB-PC01 and LAB-PC02.
  • A dedicated organizational unit, or OU, for those computer accounts.
  • Permission to manage the lab OU, security group, GPO, and WMI filter.
  • Local administrative access to both clients for inspection and refresh.

This lab starts with a working domain. It doesn’t require changes to domain controllers, default domain GPOs, or inherited security controls.

Virtual machines make the clients easier to discard. If your lab runs on physical hardware, a UPS protects the host during restarts. A NAS drive can hold exported GPO reports and backups, but those files don’t replace checks on each client.

1. Choose the Targeting Layer Before Changing Permissions

Use this table to decide where a condition belongs.

RequirementUseEvaluation scopeMain trade-off
Only selected computer or user accounts should receive the settingsSecurity filteringEntire GPO, within its linked scopeRequires correct permissions and current account membership
A receiving computer must match a system conditionWMI filterEntire GPOAdds a query that runs on each client
One registry value or other preference needs an extra conditionPreference item-level targetingOne preference itemThe GPO can apply while that item is skipped
Every intended recipient already shares an appropriate OUOU link alone may sufficeObjects within the linked scopeOU placement must match the management design

These mechanisms narrow scope. Adding a computer to a security-filter group doesn’t move its account beneath the GPO’s link.

For this computer-side lab, permissions apply to the computer account. Your administrator account’s membership won’t make the computer eligible. Microsoft’s Group Policy processing documentation explains how scope and filtering affect processing.

2. Install and Open Group Policy Management

On the Windows Server management computer:

  • Open Server Manager.
  • Select Manage > Add Roles and Features.
  • Choose Role-based or feature-based installation.
  • Select the management server.
  • Continue to Features.
  • Select Group Policy Management, then complete the installation.

If the feature is already installed, leave it selected and close the wizard.

Open Start, search for Group Policy Management, and launch it. Expand Forest > Domains > your domain.

Expected result: The domain contains Group Policy Objects, WMI Filters, and Group Policy Results nodes. GPMC manages these objects through a local Windows console. See Microsoft’s GPMC documentation.

Windows Server management desktop with Start search showing Group Policy Management

3. Create the Lab OU and Computer Security Group

On a management computer with Active Directory Users and Computers installed:

  • Open Server Manager > Tools > Active Directory Users and Computers.
  • Right-click the domain or an approved lab parent OU.
  • Select New > Organizational Unit.
  • Name it BR-LAB-Targeting.
  • Locate LAB-PC01 and LAB-PC02.
  • Right-click each computer, select Move, and choose the lab OU.

Record their original OUs first if you’ll return them later.

Next, right-click the lab OU and select New > Group. Create BR-LAB-Computers with Global scope and Security type.

Open the group’s Members tab:

  • Click Add.
  • Open Object Types and include Computers.
  • Enter LAB-PC01.
  • Click Check Names, then OK.

Leave LAB-PC02 outside the group for now.

Expected result: Both computer accounts are in the lab OU. Only LAB-PC01 belongs to BR-LAB-Computers.

Don’t enable Block Inheritance to simplify the test. Record inherited GPOs instead. The lab should coexist with existing controls.

4. Confirm Separate Administrative Permissions

Before creating the GPO, check that your account can perform each task.

TaskPermission area to confirm
Create and edit the lab GPODomain GPO creation rights and GPO delegation
Modify security filteringPermission to change the GPO’s security
Link the GPOLink-management rights on the lab OU
Change computer membershipRights to manage BR-LAB-Computers
Create a WMI filterDelegation for the domain’s WMI Filters container
Collect remote resultsAppropriate client access and remote connectivity

In GPMC, select the lab OU and inspect Delegation. Check Group Policy Objects and WMI Filters separately for their delegation controls.

Expected result: Your delegated role covers every lab task. Permission to edit settings doesn’t automatically grant permission to link a GPO or change its security.

If an operation is unavailable, have the domain administrator grant the specific lab permission. Don’t turn the test into a domain-wide change to admin rights.

Configure Security Filtering for One Computer

5. Create and Record the Lab GPO

In GPMC:

  • Right-click the BR-LAB-Targeting OU.
  • Select Create a GPO in this domain, and Link it here.
  • Name the GPO BR-LAB-Targeting.
  • Select the linked GPO and open Scope.

Confirm that the link points only to the lab OU and is enabled. On Details, record the GPO’s unique ID and status.

Leave Computer Configuration enabled. You can disable User Configuration for this computer-only example.

Before editing, use the GPO’s Save Report and Back Up options to record its initial state. Save those files outside the disposable clients.

Expected result: The lab GPO has one intended link, an enabled computer section, and no WMI filter attached.

6. Grant Apply Permission to the Lab Computer Group

Select BR-LAB-Targeting and open Scope > Security Filtering.

  • Click Add and select BR-LAB-Computers.
  • Remove the broad Authenticated Users entry from Security Filtering for this lab GPO.
  • Open Delegation.
  • Add Authenticated Users with Read permission if it no longer has read access.
  • Click Advanced and inspect both principals.

Confirm these intended permissions:

PrincipalReadApply group policy
BR-LAB-ComputersAllowAllow
Authenticated UsersAllowNot granted through this entry

Retain the normal administrative and system permissions. Check for any other broad entry granting Apply group policy. That would invalidate the comparison.

Don’t use an explicit Deny for Authenticated Users. LAB-PC01 also belongs to that broad authenticated population, so a Deny can defeat the intended Allow.

Read allows access to the GPO. Apply group policy permits its application. This split lets you retain read access without making every authenticated account a recipient.

Computer read access also matters when retrieving user-side policy. If you adapt this design for users, check computer read permissions separately from users’ Apply permissions. Confirm those requirements against primary Microsoft support documentation before using them outside this lab.

Expected result: BR-LAB-Computers appears in Security Filtering. Authenticated Users retains read-only access through Delegation.

BR-LAB-Targeting Scope tab showing the isolated OU link, BR-LAB-Computers under Security Filtering, and no WMI filter
BR-LAB-Targeting advanced security permissions showing Read and Apply group policy for BR-LAB-Computers and Read-only for Authenticated Users

7. Confirm the Marker Values Don’t Already Exist

On each client, open Start, search for Registry Editor, and run it as administrator.

Go to:

HKEY_LOCAL_MACHINE\SOFTWARE\BackRoomTechLab\Targeting

Confirm that values named Baseline and Targeted don’t exist. An absent key is fine.

If either value already exists, stop and choose another lab-only path. Don’t overwrite an existing value and assume its old contents were disposable.

Expected result: Neither client contains either marker. That clean starting point makes later exclusions meaningful.

8. Create Two Untargeted Registry Preferences

In GPMC, right-click BR-LAB-Targeting and select Edit.

Open:

Computer Configuration > Preferences > Windows Settings > Registry

Right-click Registry, then select New > Registry Item. Configure the first item:

FieldSetting
ActionUpdate initially
HiveHKEY_LOCAL_MACHINE
Key PathSOFTWARE\BackRoomTechLab\Targeting
Value nameBaseline
Value typeREG_SZ
Value dataGPO reached this computer

Open Common:

  • Leave Item-level targeting cleared.
  • Leave Apply once and do not reapply cleared.
  • Select Remove this item when it is no longer applied, if exposed for this Registry item.
  • Return to General and check the action.

Microsoft documents that the removal option changes the action to Replace. Deleting and recreating these disposable values is acceptable. Real application settings need more care. See Group Policy Preferences.

Create a second item using the same hive, path, type, and Common settings:

FieldSetting
Value nameTargeted
Value dataPreference item reached this computer

Despite its name, Targeted has no condition yet. Both values must behave the same way during the security-filter test.

If the removal control isn’t available, retain the two exact value names for the explicit cleanup steps below.

Expected result: The Registry preference list contains two lab-only values with no item-level conditions.

Computer-side Registry preferences listing the Baseline and Targeted items under SOFTWARE\BackRoomTechLab\Targeting

9. Refresh Membership and Verify Security Filtering

Restart warning: Restart only the disposable clients. Save their open work first.

Restart LAB-PC01 after its computer-group membership change. An ordinary policy refresh doesn’t guarantee that the computer’s security context is refreshed. Check the membership-refresh method for your clients before relying on it.

After signing in, open an elevated Command Prompt on each client and run:

gpupdate /target:computer /force

/target:computer processes computer policy. /force reapplies settings instead of processing only detected changes. This command changes client state.

Expected result: The command reports the computer-policy update result. A successful refresh doesn’t prove either registry item succeeded.

Inspect the exact registry path on both clients.

ClientSecurity-filter membershipTarget marker state
LAB-PC01MemberBaseline and Targeted present (when no other policy blocks or errors occur)
LAB-PC02NonmemberBoth absent (assuming no pre-existing values or overlapping GPOs)

Treat these rows as expected target states rather than guaranteed outcomes. Policy inheritance, delegated permissions, other filters, processing errors, or pre-existing registry state can change what appears on either client.

If your observed values differ, collect the actual Group Policy Results before changing another targeting layer.

Add a Bounded Client-Side WMI Filter

10. Check the WMI Condition Locally

A WMI filter runs against the receiving computer. It can exclude the entire GPO, including both preference items.

This lab proposes one operating-system condition to select workstation systems. Confirm the class, ProductType meaning, and query against Microsoft WMI documentation and your clients before using it.

Before attaching the filter, inspect both clients in elevated Windows PowerShell:

Get-CimInstance -Namespace 'root\CIMv2' -ClassName 'Win32_OperatingSystem' |
    Format-List Caption, Version, ProductType

Expected result: The command displays the operating-system caption, version, and ProductType. The positive test below requires ProductType to equal 1 on the selected client.

Check the proposed condition directly:

$matches = @(Get-CimInstance -Namespace 'root\CIMv2' `
    -ClassName 'Win32_OperatingSystem' -Filter 'ProductType = 1')
$matches.Count

Expected result: A matching workstation returns a count of 1. A count of 0 is a nonmatch. Investigate any command error before using the filter.

Don’t substitute a Windows version-string condition just to distinguish releases. Use a condition you can inspect on the actual clients.

11. Save and Associate the WMI Filter

In GPMC:

  • Expand the domain’s WMI Filters node.
  • Right-click it and select New.
  • Name the filter BR-LAB-Workstation.
  • Add a description identifying it as a lab-only applicability condition.
  • Click Add.

Set Namespace to:

root\CIMv2

Enter this WMI Query Language expression in Query:

SELECT * FROM Win32_OperatingSystem WHERE ProductType = 1

Save the query and filter. Confirm the exact control sequence on your management build.

Select BR-LAB-Targeting, open Scope, and choose BR-LAB-Workstation under WMI Filtering. Confirm it’s attached.

Expected result: The Scope tab shows the saved filter. Its editor contains one query and the intended namespace.

Saved BR-LAB-Workstation WMI filter showing root CIMv2 namespace and the single ProductType query after local validation

Refresh LAB-PC01 and inspect both values again. With matching security permissions and a matching query, both should remain present.

WMI adds work on each client. Keep queries narrow and compare actual processing diagnostics before and after attachment. Microsoft’s processing documentation describes WMI filtering. It doesn’t support a universal runtime claim for your clients.

12. Test Whole-GPO Exclusion With a Deliberate Nonmatch

For a controlled negative test, first confirm LAB-PC01 still passes security filtering.

Edit only the lab WMI query. Change its condition to ProductType = 0:

SELECT * FROM Win32_OperatingSystem WHERE ProductType = 0

On LAB-PC01, check that condition locally:

$matches = @(Get-CimInstance -Namespace 'root\CIMv2' `
    -ClassName 'Win32_OperatingSystem' -Filter 'ProductType = 0')
$matches.Count

Expected result: Proceed only if the count is 0 without an error.

Save the filter, refresh computer policy, and collect Group Policy Results as described below.

The expected outcome is whole-GPO exclusion, not automatic registry cleanup. A WMI nonmatch excludes the GPO from applying, while previously written preference values may remain on the client.

Existing markers are removed only if the preference items were configured with Remove this item when it is no longer applied and the client processes the out-of-scope state successfully. Because preference values can persist, verify exclusion in Group Policy Results rather than relying on the registry alone.

Restore the query to ProductType = 1, save, and refresh again. Confirm both markers are present before continuing.

Expected result: Changing only the WMI condition changes whether the GPO applies. Security-group membership remains unchanged.

Target One Preference Item While Keeping the GPO Applicable

13. Make Both Clients Eligible for the GPO

In Active Directory Users and Computers, open BR-LAB-Computers.

  • Select Members > Add.
  • Include Computers under Object Types.
  • Add LAB-PC02.
  • Restart LAB-PC02 after saving its work.
  • Refresh computer policy.

Keep the restored, matching WMI filter attached. Confirm its local condition matches LAB-PC02.

Inspect the registry on both clients.

Expected result: When inheritance, permissions, and the WMI filter allow processing without error, both computers should receive Baseline and Targeted. Confirming both values appear on LAB-PC02 establishes that it can receive the GPO before you narrow one item.

Without this check, a missing preference could still reflect whole-GPO exclusion.

14. Add a Computer Name Condition to Targeted

Edit BR-LAB-Targeting and return to:

Computer Configuration > Preferences > Windows Settings > Registry

Open the item managing Targeted, then:

  • Select Common.
  • Enable Item-level targeting.
  • Click Targeting.
  • Select New Item > Computer Name.
  • Enter LAB-PC01 as the exact computer-name condition.
  • Confirm the condition uses equality rather than an exclusion.
  • Save the targeting rule and preference item.

The exact fields can vary with the editor build. Inspect the condition summary before saving. Use one exact-name condition without wildcards or extra logical groups.

Leave Baseline untargeted.

Expected result: The GPO still contains two items. Only Targeted has an extra condition.

Targeted Registry item's Common tab showing Item-level targeting and the available removal option
Targeting Editor showing one Computer Name equality condition for LAB-PC01 with no extra conditions

15. Verify the Single-Item Difference

Refresh computer policy on both clients, then inspect the two values.

ClientGPO eligibilityTarget Baseline stateTarget Targeted state
LAB-PC01EligiblePresentPresent
LAB-PC02EligiblePresentRemoved or absent if configured cleanup succeeds

Actual registry states can vary if another GPO, permission conflict, processing error, or pre-existing value interferes. If Targeted remains on LAB-PC02, check its removal setting and preference diagnostics, since a previous value can survive a targeting change.

To test a fresh nonmatch separately from removal behavior, delete only Targeted from LAB-PC02 through Registry Editor. Refresh again.

Expected result: Assuming clean processing with no conflicting policies, Baseline should remain present while Targeted isn’t recreated on LAB-PC02, and LAB-PC01 should retain both values.

This comparison answers two separate questions. Does the item currently apply? Was its earlier effect removed?

Verify Actual GPO Results and Preference Processing

16. Collect Group Policy Results for Each Client

In GPMC:

  • Right-click Group Policy Results.
  • Select Group Policy Results Wizard.
  • Choose the lab computer.
  • Select the computer-results options appropriate to the wizard on your build.
  • Complete collection.
  • Open the report and inspect the computer configuration results.

If collection fails, resolve client connectivity and delegated access first. Don’t loosen domain-wide firewall or security policy to obtain one report.

Find BR-LAB-Targeting in the applied or filtered GPO information. Record the computer name, collection time, and reported reason.

Expected evidence:

  • During the security test, LAB-PC02 is excluded through security filtering.
  • During the deliberate WMI nonmatch, the otherwise eligible client is excluded by WMI filtering.
  • During item-level targeting, the GPO remains applicable to both clients.

Use actual report wording. Don’t infer a filtering reason solely from an absent registry value.

Group Policy Results for LAB-PC02 showing collection time and BR-LAB-Targeting denied by security filtering

For a local report, run this from an elevated Command Prompt:

gpresult /scope computer /h "%TEMP%\BR-LAB-Targeting.html" /f

/h writes an HTML report. /f replaces an existing report at that path. This collects results without refreshing policy.

Expected result: The command reports the saved HTML location. Open that file to inspect the computer’s recorded results.

Group Policy Modeling simulates outcomes. Use Group Policy Results and client inspection for this lab’s actual evidence.

17. Inspect Preference Errors Separately

On the affected client:

  • Open Event Viewer.
  • Go to Windows Logs > Application.
  • Choose Filter Current Log.
  • Inspect events around the refresh time.
  • Match the preference extension, item, GPO, and error text.

Microsoft documents preference application failures such as Event 4098. It also lists targeting-error events, including 4105 and 4106. Check the matching provider and message rather than relying on the number alone. See Microsoft’s Group Policy Preferences event reference.

A condition returning false is an expected skip. A namespace failure, malformed query, or targeting evaluation error needs repair.

Informational success events depend on logging settings. Their absence doesn’t prove failure.

Finally, return to Registry Editor and inspect:

HKEY_LOCAL_MACHINE\SOFTWARE\BackRoomTechLab\Targeting

Expected result: The observed values should align with the current test phase, though a successful GPO report alone doesn’t prove every preference item completed.

Registry Editor on LAB-PC01 showing Baseline and Targeted values under HKLM\SOFTWARE\BackRoomTechLab\Targeting

Fix Common Group Policy Targeting Failures

18. Fix a GPO Missing From the Intended Computer

Symptom: BR-LAB-Targeting doesn’t appear as applied, and neither marker is created.

Check in this order:

  • Locate the computer account in Active Directory Users and Computers.
  • Confirm it’s in the linked lab OU.
  • In GPMC, confirm the OU link is enabled.
  • Confirm Computer Configuration is enabled.
  • Review inherited policy and actual Group Policy Results.
  • Inspect security and WMI filtering.

Expected result: You find what excludes the GPO before editing preference conditions.

Adding another security-group member won’t repair an incorrect OU link.

19. Fix Security Filtering After a Membership Change

Symptom: Results still show security exclusion after adding the computer.

  • Open BR-LAB-Computers and verify the computer account is a member.
  • Inspect Delegation > Advanced on the GPO.
  • Confirm the intended group has both Read and Apply group policy.
  • Check for conflicting Deny permissions.
  • Restart the disposable client, then refresh and collect results again.

Expected result: The new test should use refreshed computer membership and the intended permissions. Confirm that membership took effect rather than assuming the restart resolved it.

Keep user accounts and computer accounts separate in your checks. They’re different principals, even when the same person operates the machine.

20. Fix a WMI Nonmatch or Evaluation Error

Symptom: The GPO applies without its WMI filter but fails with it attached.

  • Open the attached filter and check its namespace.
  • Compare its condition with the local CIM inspection.
  • Confirm the local condition returns matches without errors.
  • Collect actual Group Policy Results.
  • Inspect client diagnostics for evaluation failures.

Expected result: You can tell an intended zero-match result from a query or provider failure.

If processing becomes slower, detach only the lab filter and compare diagnostics. Don’t stack more queries while diagnosing the first one.

21. Fix a Missing Item Inside an Applied GPO

Symptom: Baseline is present while Targeted is absent.

  • Open Targeted’s Common > Targeting editor.
  • Verify the computer name and equality condition.
  • Remove unintended AND, OR, or exclusion conditions from this lab rule.
  • Confirm Apply once and do not reapply remains cleared.
  • Inspect matching Application-log errors.
  • Check whether another item overwrites the same value.

Expected result: You identify an expected item skip, a processing error, or an overwrite.

Don’t remove the GPO’s security filtering just because one preference item is absent. The existing Baseline value and current results help narrow the fault.

Remove Lab Settings Before Deleting the GPO

22. Delete the Markers While Both Clients Remain Reachable

Keep both clients in the lab group and OU. Restore the matching WMI filter if needed.

To send explicit cleanup instructions:

  • Edit BR-LAB-Targeting.
  • Open each Registry preference item.
  • Clear its item-level targeting so cleanup reaches both clients.
  • Clear the automatic-removal option if needed to change the action.
  • Set Action to Delete.
  • Verify the exact hive, key path, and individual value name.
  • Save both items.

Deletion warning: Delete only the Baseline and Targeted values. Don’t configure deletion of the entire BackRoomTechLab key.

Refresh computer policy on both clients.

Expected result: Both exact values should be removed when the Delete preference items process without error. This cleanup runs while the GPO remains applicable rather than depending on unlinking behavior, so verify the result on each client.

Preferences can leave settings behind when they stop applying. Microsoft’s Preferences documentation describes the removal control and its Replace behavior.

23. Verify Removal on Both Clients

Open Registry Editor on LAB-PC01 and LAB-PC02. Inspect the exact lab path.

Confirm that Baseline and Targeted are absent. An empty key can remain. The two values are the settings this lab managed.

If either survives:

  • Confirm the Delete item was received without a processing error.
  • Verify that no targeting condition excludes the cleanup item.
  • Delete only the remaining lab-owned value manually if needed.
  • Refresh again and confirm it doesn’t return.

Expected result: After a clean refresh, neither client should contain either marker.

Registry Editor on LAB-PC01 after cleanup with the BackRoomTechLab Targeting key showing no Baseline or Targeted values

24. Remove Only the Lab Objects

After checking both clients:

  • Save the final GPO report and relevant results.
  • In GPMC, remove the BR-LAB-Targeting link from the lab OU.
  • Check the GPO’s remaining links.
  • Delete the GPO from Group Policy Objects only if nothing else requires it.
  • Check whether BR-LAB-Workstation has other associations, then remove it if unused.
  • Remove the disposable BR-LAB-Computers group only if nothing else depends on it.
  • Return or decommission the clients.
  • Delete the lab OU only when it’s empty and no longer required.

Deleting a link and deleting a GPO are different operations. Inspect the selected object and confirmation text before proceeding.

Expected result: The clients are clean before their targeting configuration disappears.

Wrapping Up

StepActionApplies To
Establish scopeCheck OU placement, links, and enabled sectionsGPO
Select recipientsGrant Read and Apply to the intended accountsGPO
Check the computerAttach one locally validated WMI conditionGPO
Narrow a settingAdd a condition to one preference itemIndividual item
Prove the resultCompare actual reports with client stateEach client
Remove the effectsDelete exact lab values before dismantlingEach client

I’d use security filtering for membership and reserve WMI for conditions that need client inspection. Preference targeting fits individual exceptions, but test its cleanup behavior too. When a setting goes missing, check one layer at a time. Compare reports with the client’s actual state.