Solved

Windows 7/8/8.1 WMI Query

Posted on 2014-11-07
7
1,717 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 11

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 78

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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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 78

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 11

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

939 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now