WMI

From WikiWiki
Jump to navigation Jump to search

Some WMI filters



Header text Header text Header text References
Example Get all Windows Desktop OS higher then Win7 select * from Win32_OperatingSystem where (Version like "10.%" or Version >="6.1") and ProductType = "1"
Example Select all computer not Domain Controller
  • SELECT * FROM Win32_ComputerSystem Where DomainRole <> 4 AND DomainRole <> 5
  • select * from Win32_OperatingSystem where (ProductType = "3")
Example Example Example


Manually test WMI

wbemtest

  • open
  • connect
  • query
  • if result == blank, query failed, if result holds hostname, query succedded