Group Policy WMI filters for Windows 7/8/8.1/10

Every now and then during Windows 10 deployments we need to use WMI filters for group policy objects, there are simply no better way of doing this, without a lot of work. WMI is simple to use and demands little maintenance.

There WMI filters may also come handy since there are group policy settings that only applies to one or two builds.

So here are some examples, ready to use for all operating system.

There are three queries for all operating system, 64-bit, 32-bit and both.

Windows 10 1703

select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″

Windows 10 1607

select Version from Win32_OperatingSystem WHERE Version like “10.0.14393” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.14393” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.14393” AND ProductType=”1″

Windows 10 1511

select Version from Win32_OperatingSystem WHERE Version like “10.0.10586” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.10586” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.10586” AND ProductType=”1″

Windows 10 1507

select Version from Win32_OperatingSystem WHERE Version like “10.0.10240” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.10240” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.10240” AND ProductType=”1″

Windows 10 all builds

select Version from Win32_OperatingSystem WHERE Version like “10.%” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.%” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.%” AND ProductType=”1″

Windows 7, 8 and 8.1 (all versions before 10)

select Version from Win32_OperatingSystem WHERE Version like “6.%” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.%” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.%” AND ProductType=”1″

Windows 8.1

select Version from Win32_OperatingSystem WHERE Version like “6.3%” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.3%” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.3%” AND ProductType=”1″

Windows 8

select Version from Win32_OperatingSystem WHERE Version like “6.2%” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.2%” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.2%” AND ProductType=”1″

Windows 7

select Version from Win32_OperatingSystem WHERE Version like “6.1%” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.1%” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “6.1%” AND ProductType=”1″

Advertisements

Share your findings with your friends

Like this:

Related

Published by Mattias Fors

Mattias working as a technical architect for Advania. Mainly working in the areas of Client Deployment and Management including Configuration Manager, Intune, Office 365, Azure, Windows Server and Client. I have been devoted to enterprise client infrastructure for many years now.
I run the blog https://deploywindows.com and https://crugse.wordpress.com
View all posts by Mattias Fors

select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″ AND OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″ AND NOT OSArchitecture = “64-bit”
select Version from Win32_OperatingSystem WHERE Version like “10.0.15063” AND ProductType=”1″