REIT
asked on
Windows 7/8/8.1 WMI Query
Hi Experts,
I'm going to be deploying a GPO next week to target Windows 7/8/8.1 x64 machines only but I need to create a WMI Filter for the GPO. I need a WMI Query which will work to target 64bit machines with Windows 7/Windows 8/Windows 8.1 only.
Can someone provide me with a working and tested query?
Would this work?
select * from Win32_OperatingSystem where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1"
I'm going to be deploying a GPO next week to target Windows 7/8/8.1 x64 machines only but I need to create a WMI Filter for the GPO. I need a WMI Query which will work to target 64bit machines with Windows 7/Windows 8/Windows 8.1 only.
Can someone provide me with a working and tested query?
Would this work?
select * from Win32_OperatingSystem where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1"
Looks correct to me.
ASKER
Testing the gpo soon guys bear with me!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
your query works for all Win7/8/8.1
Which you were told was correct
Select * from Win32_OperatingSystem Where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1" and OSArchitecture = "64-bit"
works for x64 systems with O/S Win7/8/8.1
Which you were told was correct
Select * from Win32_OperatingSystem Where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1" and OSArchitecture = "64-bit"
works for x64 systems with O/S Win7/8/8.1
Your question was if your query would work where it was answered that the query was fine.
Can you maybe let us know why you think that my query won't work as I have tested it and it works for 64-bit computers (which is also in your question). Also David pointed this out.
Closing it without giving any points seems a bit unfair to me.
Can you maybe let us know why you think that my query won't work as I have tested it and it works for 64-bit computers (which is also in your question). Also David pointed this out.
Closing it without giving any points seems a bit unfair to me.
ASKER
My query worked, the expert which commeneted his version of the query didnt work.
The version numbers are described here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
If you want to be more specific and also check for a 64-bit OS then the query would be:
Select * from Win32_OperatingSystem Where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1" and OSArchitecture = "64-bit"