Why aren't my GPO WMI filters applying when downloading Windows 10?

DocJelly

New member
Jun 18, 2013
4
0
0
Visit site
Windows 10 Version number in WMI

Hi there, I'm messing around with the Windows 10 Enterprise preview (build 9926) and seem to have run into something funny... my GPO WMI filters don't seem to want to apply... After searching around and finding out about gwmi in PowerShell, I've done some testing and it doesn't really seem to add up!

powershell command:
gwmi -Query 'SELECT Version, ProductType FROM Win32_OperatingSystem WHERE ((Version >= "6.2.%") AND (ProductType = "1"))'

This query should return SOMETHING if it's true, or nothing, just return to the prompt it false.

If I run this on a windows 8.1 install, it returns true. If I run this on a Windows 10 install, it returns false. Windows 10 seems to think that Version 10.0.9926 is NOT greater than or equal to 6.2.% :)

Could someone else try running that query on a Windows 10 preview install from a powershell command promp and confirm that they get the same "false" response that I do?

If I change it to Version >= "10" or "10.%" then it returns true... so the query is correct, it's just not evaluating Windows 10's version number to be greater than 6.2.% (Windows 8.1's version number)

Or maybe I'm just taking crazy pills :)
 

David Feifer

New member
Sep 12, 2014
267
0
0
Visit site
Re: Windows 10 Version number in WMI

Same thing here. Ran in both ps and ps ise as admin appeared to run and just went back to command prompt.
 

DocJelly

New member
Jun 18, 2013
4
0
0
Visit site
Re: Windows 10 Version number in WMI

Ack. lost my reply because I don't have enough points to include the link to the blog post where I discovered gwmi :)

according to that blog post that I cannot link to in a reply, :wink: , if it returns ANYTHING, that means it's $true, but if it returns nothing/blank/null just the command prompt again, that means it's $false.

So Version 10.0.9926 is less than 6.2.% according to Windows 10 :)
 

joshuaaluke

New member
Feb 9, 2015
1
0
0
Visit site
It's because the value is evaluated as text. Just like in Excel when you sort numbers as text - 10 is lower than 6 because it starts over when it gets back to 1. An "or" statement is required.
 

jnjroach

Member
Apr 24, 2014
194
0
16
Visit site
Re: Windows 10 Version number in WMI

Where are you attempting to apply the GPO? If it is from an AD environment, have you imported the ADMX files for Windows 10?
 

Members online

Forum statistics

Threads
323,236
Messages
2,243,501
Members
428,049
Latest member
Nathanboro12