Solved

Windows 7/8/8.1 WMI Query

Posted on 2014-11-07
7
1,793 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 79

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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 79

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
An article on effective troubleshooting
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
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 …

770 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