Thursday, 7 April 2011

WMI Filters for different Windows versions

In order to run multiple operating systems in the same OU structure  and have relevant GPO's applied we can make use of WMI filters. These filters can be used to interrogate the operating system and either apply or not based on the result.

I will not go into how to create a WMI filter here as if you are here looking at this then you only really want the query needed to create the filter.

The basic filter will take the following format

Select * from Win32_OperatingSystem Where Version like “x” and ProductType = “y" 

OS Version

The relevant  OS version values are as follows, these can be substituted in place of x:

Windows 7 or Server 2008 R2 = “6.1%”
Windows Vista or Server 2008 = “6.0%”
Windows XP = “5.2%”
Windows 2000 = “5.0%”

Product Type

 To filter by roles the computer may perform, change the ProductType (y) to:

Client = “1”
Server running a Domain Controller role = “2”
Member server (server that’s not a DC) = “3”

No comments:

Post a Comment

Please enter your comment here, all comments are subject to moderation