14 окт. 2014 г.

WMI Filters for GPO

Select * from WIN32_OperatingSystem where ProductType= 1
- Worstations

Select * from WIN32_OperatingSystem where ProductType>1
- Servers

Select * from Win32_Processor where AddressWidth = '32' ('64')
- It's clear

SELECT OSArchitecture FROM Win32_OperatingSystem where OSArchitecture = "64-bit"
- Same

Select * from WIN32_OperatingSystem where Version like '5.1.%'
- XP & 2003

SELECT * FROM Win32_OperatingSystem where Version = "6.1%" and ProductType = "1"
- Windows 7

SELECT ProductType FROM Win32_OperatingSystem WHERE ProductType = "2"
- domain controllers (1 - AD WS, 3 - member servers)

Select * from win32_computersystem where name= ”WS01” (or name LIKE "WS01*")
- only selected computer(s)

Select * FROM Win32_IP4RouteTable WHERE Destination='0.0.0.0' AND NextHop='10.40.240.254'
- only selected ip subnet