?
Solved

Windows 7/8/8.1 WMI Query

Posted on 2014-11-07
7
Medium Priority
?
2,121 Views
Last Modified: 2014-12-01
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"
0
Comment
Question by:Rizzle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 12

Expert Comment

by:zalazar
ID: 40429645
This query is fine and this will probably 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"
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 40429649
Looks correct to me.
0
 
LVL 13

Author Comment

by:Rizzle
ID: 40446372
Testing the gpo soon guys bear with me!
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 
LVL 13

Accepted Solution

by:
Rizzle earned 0 total points
ID: 40466947
My query worked.


select * from Win32_OperatingSystem where (Version like "6.1%" or Version like "6.2%" or Version like "6.3%") and ProductType = "1"
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 40467403
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
0
 
LVL 12

Expert Comment

by:zalazar
ID: 40467588
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.
0
 
LVL 13

Author Closing Comment

by:Rizzle
ID: 40473319
My query worked, the expert which commeneted his version of the query didnt work.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring Remote Assistance for use with SCCM
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question