Windows server
Collection of Windows Server-related resources.
Create wmi filter for windows 11
- Follow Microsoft Learn's Create WMI Filter for GPO
-
For Query, enter the following:
select * from Win32_OperatingSystem where Version like "10.%" and ProductType = "1" and BuildNumber >= "22000"
-
select * from Win32_OperatingSystem where
-- Queries all rows from the Win32_OperatingSystem WMI class that match the following specified conditions. -
Version like "10.%"
-- Filters for operating systems with a major version of 10.x. (Windows 10 and 11 both report 10.0 as their major version in WMI, which is why we need to specify BuildNumber as well). -
ProductType = "1"
-- Limits the filter to client operating systems (i.e. Windows 10 Home/Pro, Windows 11 Home/Pro) -
BuildNumber >= "22000"
-- Filters Windows 11 from Windows 10.  Microsoft did not increment the major version for Windows 11 (it still reports 10.0) 🙄, so the build number is the only reliable way to identify Windows 11.  Windows 10 build numbers below 22000 and Windows 11 build numbers 22000 and above.
-
You can confirm the client OS version and build number by running the following PowerShell command on the client machine:
grafts: