Solved

WMI Filters - Need to target XP 32 bit and 64 bit only

Posted on 2010-11-11
10
2,331 Views
Last Modified: 2012-05-10
Hi,

I need to target a group policy at WIndows XP x86 and x64 operating systems only.

The current filter i am using (shown below, seems to only affect the xp 32 bit versions.

select * from Win32_OperatingSystem where Version like "5.1%" and ProductType = "1"

Any ideas?

thanks
0
Comment
Question by:ranski
[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
  • 5
  • 4
10 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 34114561
I haven't tested this

32 bit OS "select * from Win32_Processor where AddressWidth = 32"

64bit OS "select * from Win32_Processor where AddressWidth = 64"

addresswidth reference   http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx

Thanks

Mike
0
 

Author Comment

by:ranski
ID: 34114747
Hi, this would also apply to windows 7 machines though which I do not want to happen.
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 34115735
Since you can not have to classes in your WMI query you will have to create two separate GPOs or you could use the operatingsystem class you you did but just change it a little

x32
select * from Win32_OperatingSystem where Caption = "Microsoft Windows XP Professional"

x64
select * from Win32_OperatingSystem where Caption = "Microsoft(R) Windows(R) XP Professional x64 Edition"

Using the Processor class like Mike mentioned is the better way of doing this to find x64 or x32 clients. You will want to check the Caption on your computers to make sure they match.

An easy way to check is to use powershell

gwmi -Class Win32_OperatingSystem | FL Caption
   
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:ranski
ID: 34115771
thanks Ken,
Surelly there must be a way to target them both just using one filter?
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 34115861
Wait, I read that wrong. The one you posted looks like it should get all XP computers. I verified those settigns on a x64 version of XP and they were right.

Try this


select * from Win32_OperatingSystem where Caption Like "%XP Professional%"

I have not tested this but will in my lab.
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 34115963
XP x64 is version 5.2 not 5.1 that is why your original query did not work.

I tested the previous one I posted and it did work.

0
 

Author Comment

by:ranski
ID: 34116151
Really I thought 5.2 was server 2003 when looking here - http://technet.microsoft.com/en-us/library/cc754488(WS.10).aspx
But since then i found the below. The key is to make sure you specify that 5.2 is of product type 1, for server you would use 3

select * from Win32_OperatingSystem where (Version like "5.1%" or Version like "5.2%") and ProductType = "1"
The one below that you suggested worked like a charm though.
select * from Win32_OperatingSystem where Caption Like "%XP Professional%"

Thanks very much!
0
 

Author Closing Comment

by:ranski
ID: 34116153
much appreciated!
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 34116235
Here is a link to all the version numbers


http://msdn.microsoft.com/en-us/library/ms724832(VS.85).aspx
0
 

Author Comment

by:ranski
ID: 34116570
thanks again.
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
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 …

710 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