Solved

WMI filter for Windows 7 and Windows XP only all flavors

Posted on 2012-04-04
4
1,122 Views
Last Modified: 2012-06-22
I wants to apply GPO only to all flavors of Windows 7 and Windows XP only (32 and 64 bit). Can some help me with the WMI filter query?
0
Comment
Question by:sirineni
  • 3
4 Comments
 
LVL 6

Expert Comment

by:Raquero
ID: 37808698
Check out this post:

http://www.computerperformance.co.uk/w2k3/gp/group_WMI_filters.htm

Windows 7 example:

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="1"
0
 
LVL 5

Expert Comment

by:2Cs
ID: 37808710
I believe you would have to do this by creating a security group and add the Windows XP and Windows 7 machine accounts. You can only apply WMI filters to one O/s at a time but this solution should work around that.
0
 
LVL 6

Expert Comment

by:Raquero
ID: 37808713
...should have mentioned it is simpler (and better...WMI on GPO slows processing down) to organize desktops/laptops into different OUs than servers. Then link the desired GPO to the OU where the workstations are and it will not affect servers and other systems you do not want it to apply to.

You can do this with OS specifc OUs if you desire, or by category such as Desktop, Laptop, etc. Don't get too granular with OUs, just use what you need to get to the desired configuration.
0
 
LVL 6

Accepted Solution

by:
Raquero earned 500 total points
ID: 37808733
I agree with 2Cs's comment that using a security group is a good idea for restricting what machines a GPO applies to, but that can become an admistrative headache over time if folks forget to add new member computers to the group.

These should work if you really must use WMI:

This one will apply to W7 & XP only:

select * from Win32_OperatingSystem where (Version like "6.1%" or Version like "5%") and ProductType="1"

This one should apply to all client OS's from XP to Vista, to W7:

select * from Win32_OperatingSystem where ProductType="1"

See http://technet.microsoft.com/en-us/library/cc754488(v=WS.10).aspx for more information on versions and product types.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account 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 …

910 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

21 Experts available now in Live!

Get 1:1 Help Now