用于AD域GPO的WMI筛选参数

补充:

ProducType= “1” [表示客户端操作系统]

ProducType= “2” [表示服务器操作系统并且是域控]

ProducType= “3” [表示服务器操作系统,不是域控]

另外windows系统使用WMI筛选可能不会生效,暂时未知,可通过项目的目标编辑器配合使用

DESKTOPS

Version 1

select * from Win32_OperatingSystem WHERE ProductType = "1"

Version 2 (better for Win7 sometimes)

select * from Win32_OperatingSystem WHERE (ProductType <> "2") AND (ProductType <> "3")

32-bit

select * from Win32_OperatingSystem WHERE ProductType = "1" AND NOT OSArchitecture = "64-bit"

64-bit

select * from Win32_OperatingSystem WHERE ProductType = "1" AND OSArchitecture = "64-bit"

WINDOWS XP

Windows XP select * from Win32_OperatingSystem WHERE (Version like "5.1%" or Version like "5.2%") AND ProductType="1"

32-bit

select * from Win32_OperatingSystem WHERE (Version like "5.1%" or Version like "5.2%") AND ProductType="1" AND NOT OSArchitecture = "64-bit"

64-bit

select * from Win32_OperatingSystem WHERE (Version like "5.1%" or Version like "5.2%") AND ProductType="1" AND OSArchitecture = "64-bit"

WINDOWS VISTA

Windows Vista

select * from Win32_OperatingSystem WHERE Version like "6.0%" AND ProductType="1"

32-bit

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

64-bit

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

WINDOWS 7

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="1"

 32-bit

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

64-bit

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

WINDOWS 8

select * from Win32_OperatingSystem WHERE Version like "6.2%" AND ProductType="1"

32-bit

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

64-bit

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

Windows 8.1

select * from Win32_OperatingSystem WHERE Version like "6.3%" AND ProductType="1"

32-bit

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

64-bit

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

Windows 10

select * from Win32_OperatingSystem WHERE Version like "10.0%" AND ProductType="1"

32-bit

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

64-bit

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

SERVERS

select * from Win32_OperatingSystem where (ProductType = "2") OR (ProductType = "3")

32-bit

select * from Win32_OperatingSystem where (ProductType = "2") OR (ProductType = "3") AND NOT OSArchitecture = "64-bit"

64-bit

select * from Win32_OperatingSystem where (ProductType = "2") OR (ProductType = "3") AND OSArchitecture = "64-bit"

Domain Controller

select * from Win32_OperatingSystem where (ProductType = "2")

32-bit

select * from Win32_OperatingSystem where (ProductType = "2") AND NOT OSArchitecture = "64-bit"

64-bit

select * from Win32_OperatingSystem where (ProductType = "2") AND OSArchitecture = "64-bit"

Non-Domain Controller

select * from Win32_OperatingSystem where (ProductType = "3")

32-bit

select * from Win32_OperatingSystem where (ProductType = "3") AND NOT OSArchitecture = "64-bit"

64-bit

select * from Win32_OperatingSystem where (ProductType = "3") AND OSArchitecture = "64-bit"

WINDOWS SERVER 2003

DC

select * from Win32_OperatingSystem WHERE Version like "5.2%" AND ProductType="2

non-DC

select * from Win32_OperatingSystem WHERE Version like "5.2%" AND ProductType="3"

32-bit – DC

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

32-bit – non-DC

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

64-bit – DC

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

64-bit – non-DC

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

WINDOWS SERVER 2003 R2

DC

select * from Win32_OperatingSystem WHERE Version like "5.2.3%" AND ProductType="2"

non-DC

select * from Win32_OperatingSystem WHERE Version like "5.2.3%" AND ProductType="3"

32-bit – DC

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

32-bit – non-DC

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

64-bit – DC

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

64-bit – non-DC

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

WINDOWS SERVER 2008

DC

select * from Win32_OperatingSystem WHERE Version like "6.0%" AND ProductType="2"

non-DC

select * from Win32_OperatingSystem WHERE Version like "6.0%" AND ProductType="3"

32-bit – DC

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

32-bit – non-DC

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

64-bit – DC

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

64-bit – non-DC

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

WINDOWS SERVER 2008 R2

64-bit – DC

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="2"

64-bit – non-DC

select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="3"

WINDOWS SERVER 2012

64-bit – DC

select * from Win32_OperatingSystem WHERE Version like "6.2%" AND ProductType="2"

64-bit – non-DC

select * from Win32_OperatingSystem WHERE Version like "6.2%" AND ProductType="3"

WINDOWS SERVER 2012 R2

64-bit – DC

select * from Win32_OperatingSystem WHERE Version like "6.3%" AND ProductType="2"

64-bit – non-DC

select * from Win32_OperatingSystem WHERE Version like "6.3%" AND ProductType="3"

Detect device by type

Desktop

Select * from Win32_ComputerSystem WHERE (PCSystemType = 1)

Mobile / Laptop

Select * from Win32_ComputerSystem WHERE (PCSystemType = 2)

Workstation

Select * from Win32_ComputerSystem WHERE (PCSystemType = 3)

Enterprise Server

Select * from Win32_ComputerSystem WHERE (PCSystemType = 4)

Small Office and Home Office (SOHO) Server

Select * from Win32_ComputerSystem WHERE (PCSystemType = 5)

Appliance PC

Select * from Win32_ComputerSystem WHERE (PCSystemType = 6)

Performance Server

Select * from Win32_ComputerSystem WHERE (PCSystemType = 7)

上一篇