Thursday, December 27, 2012

Create a Group Policy WMI filter to determine 64 bit or 32 bit Operating System

I needed to create a WMI filter for Group Policy that would separate 64 bit and 32 bit Operating Systems.

Source: http://community.spiceworks.com/how_to/show/1432-using-wmi-filters-to-apply-group-policy-to-a-target-operating-system

Open Group Policy Management.  Expand the Forest and Domain, down to WMI Filters.



Right click WMI Filters and select New…



Type a Name (for 64 bit operating systems) for the Filter and a Description.  Click Add



Leave the Namespace as root\CIMv2

Type the Query

SELECT AddressWidth FROM Win32_Processor WHERE AddressWidth ='64'  and click OK



Click Save

 

Repeat the process, for 32 bit Operating Systems.  The Query is:

SELECT AddressWidth FROM Win32_Processor WHERE AddressWidth ='32'.

This can then be applied to a Policy



Some handy WMI filters for further separation:

Windows 7 32 bit:

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND
ProductType="1" AND NOT OSArchitecture = "64-bit"

Windows 7 64 bit:

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND
ProductType="1" AND OSArchitecture = "64-bit"

Windows 8 32 bit:

select * from Win32_OperatingSystem WHERE Version like "6.2%" AND
ProductType="1" AND NOT OSArchitecture = "64-bit"

Windows 8 64 bit:

select * from Win32_OperatingSystem WHERE Version like "6.2%" AND
ProductType="1" AND OSArchitecture = "64-bit"

7 comments:

  1. I have also created a new post listing other WMI filters for more operating systems:
    http://anonit.blogspot.com.au/2014/01/wmi-filters-for-operating-systems.html

    ReplyDelete
  2. Awesome article! I'm using it to help a client in need, so thanks again! :)

    ReplyDelete
  3. Good article, exactly what I was looking for!

    ReplyDelete
  4. Yeah thanks for the concise info do you have some filters for Win 10, I could figure it out but .....

    ReplyDelete
  5. Thanks, just what I was googling for.

    ReplyDelete