Solved

Windows 7/8/8.1 WMI Query

Posted on 2014-11-07
7
1,918 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 80

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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
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 80

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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

730 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