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:
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”