Operating systems older than Vista:
SELECT Version FROM Win32_OperatingSystem WHERE Version < "6"
Vista and 2008 only:
SELECT Version FROM Win32_OperatingSystem WHERE Version LIKE "6.0%"
Only Win XP SP2:
SELECT Version FROM Win32_OperatingSystem WHERE Version = "5.1.2600"
W2K8, regardless of SP. (ie Not equal to workstation (1))
SELECT * FROM Win32_OperatingSystem WHERE Version LIKE “6.0.%” AND ProductType <> “1”
Only on Windows Server 2008 Core servers. Here is a sample query (wrapped for readability, this should be done as a single line in the filter dialog):
SELECT OperatingSystemSKU FROM Win32_OperatingSystem WHERE OperatingSystemSKU = 12 OR OperatingSystemSKU = 39 OR OperatingSystemSKU= 14 OR OperatingSystemSKU = 41 OR OperatingSystemSKU = 13 OR OperatingSystemSKU = 40 OR OperatingSystemSKU = 29
These values map back to HEX values, which map back to:
PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027
PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029
PRODUCT_STANDARD_SERVER_CORE 0x0000000D
PRODUCT_STANDARD_SERVER_CORE_V 0x00000028
PRODUCT_WEB_SERVER_CORE 0x0000001D
Only on a certain day of the week:
To do this, your WQL queries (one filter per GPO that you wanted to set, remember) would be:
Select DayOfWeek from Win32_LocalTime where DayOfWeek = 1
Select DayOfWeek from Win32_LocalTime where DayOfWeek = 2
Select DayOfWeek from Win32_LocalTime where DayOfWeek = 3
One is Monday, two is Tuesday, etc.
Select only laptops (ie computers without sodimm memory:
Select * from Win32_PhysicalMemory where FormFactor != 12
Not a server:
SELECT ProductType FROM Win32_OperatingSystem WHERE ProductType = “1”
See: http://blogs.technet.com/askds/archive/2008/09/11/fun-with-wmi-filters-in-group-policy.aspx
Powered by: newtelligence dasBlog 2.2.8279.16125
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2025, john kelly
E-mail