How to Target Group Policies to Windows 11, Servers, or Desktops
- Last updated: Jul 3, 2025
In certain scenarios, you might need to apply Group Policy Objects (GPOs) only to specific types of computers. For instance, you probably wouldn't want a GPO designed to automatically shut down the operating system to target your servers. To address this, Microsoft provides a feature called WMI filters. Let's explore how they work and how you can create them effectively!
How to Create a WMI Filter
- Open the Group Policy Management Console (GPMC):

- In the left pane, expand the domain, right-click on WMI Filters, and select New...:

- Provide a clear name and description for your new WMI filter, then click Add:

- Define your WMI filter query using appropriate parameters. For example, to target Windows 10 and Windows 11 desktops, enter:
Version like "10.%"
to target both Windows 10 and Windows 11.ProductType = "1"
to select only desktop computers.

- Now, link your WMI filter to a Group Policy Object (GPO). To do this, select the GPO you want to filter, navigate to the WMI Filtering section, choose the filter you've just created from the dropdown list, and click OK:

- Confirm your choice by clicking Yes when prompted:

Examples of WMI Filters
- Desktop Computers only:
select * from Win32_OperatingSystem WHERE ProductType = "1"
- Windows 11 (Desktops):
select * from Win32_OperatingSystem where Version like "10.0.2%" and ProductType="1"
- Windows 10 (Desktops):
select * from Win32_OperatingSystem where Version like "10.0.1%" and ProductType="1"
- Windows 7 or Windows Vista (Desktops):
select * from Win32_OperatingSystem where (Version like "10.%" or Version like "6.0%") and ProductType="1"
- Windows Server 2025:
select * from Win32_OperatingSystem where Version like "10.0.2%" and ProductType="3"
- Windows Servers (Domain Controller Only):
select * from Win32_OperatingSystem where ProductType="2"
- Windows Servers (Non-Domain Controller):
select * from Win32_OperatingSystem where ProductType="3"
- Windows 10 64 bits or Windows 2016/2019 Domain Controllers:
select * from Win32_OperatingSystem where Version like "10.0.1%" and (ProductType="1" or ProductType="2") and OSArchitecture = "64-bit"
List of WMI Query Parameters
Below is a list of common parameters you can use to build custom WMI filters tailored to your needs:
Parameters | |
---|---|
Desktops | ProductType = "1" |
Servers (Domain Controller Only) | ProductType = "2" |
Servers (Non-Domain Controller) | ProductType = "3" |
32 bits | NOT OSArchitecture = "64-bit" |
64 bits | OSArchitecture = "64-bit" |
Windows XP or Server 2003/R2 | Version like "5.1%" or Version like "5.2%" |
Windows Vista or Server 2008 | Version like "6.0%" |
Windows 7 or Server 2008R2 | Version like "6.1%" |
Windows 8 Server 2012 | Version like "6.2%" |
Windows 8.1 or Server 2012R2 | Version like "6.3%" |
Windows 10 or Server 2016/2019 | Version like "10.0.1%" |
Windows 11 or Server 2025 | Version like "10.0.2%" |
- Note: Type "
ver
" in a terminal to display the Windows version.
