From LedHed's Wiki
Jump to: navigation, search
(Created page with " SELECT * FROM Win32_OperatingSystem WHERE ProductType = 2 References Category:Group PolicyCategory:WMI")
 
 
Line 1: Line 1:
 +
WMI Filters are a useful tool when using Group Policy.<BR>
 +
WMI Filters allow you to target specific classes of objects.
  
 +
For examply, say you create a policy that you want to only apply to Domain Controllers
 
  SELECT * FROM Win32_OperatingSystem WHERE ProductType = 2
 
  SELECT * FROM Win32_OperatingSystem WHERE ProductType = 2
  
  
References
+
Or more importantly you have a policy that you want to exclude Domain Controllers
 +
SELECT * FROM Win32_OperatingSystem WHERE ProductType <> 2
 +
 
 +
 
 +
Or you want to target Laptops
 +
SELECT * FROM Win32_Battery WHERE (BatteryStatus <> 0)
 +
This WMI Filter users WMI to discover the workstations 'BatteryStatus', If the battery status is not 0 (a battery is present) then consider the device a laptop.
 +
 
 +
 
 +
 
 +
== References ==
 +
http://technet.microsoft.com/en-us/library/cc947846%28v=ws.10%29.aspx
 +
 
  
 
[[Category:Group Policy]][[Category:WMI]]
 
[[Category:Group Policy]][[Category:WMI]]

Latest revision as of 22:08, 15 October 2013

WMI Filters are a useful tool when using Group Policy.
WMI Filters allow you to target specific classes of objects.

For examply, say you create a policy that you want to only apply to Domain Controllers

SELECT * FROM Win32_OperatingSystem WHERE ProductType = 2


Or more importantly you have a policy that you want to exclude Domain Controllers

SELECT * FROM Win32_OperatingSystem WHERE ProductType <> 2


Or you want to target Laptops

SELECT * FROM Win32_Battery WHERE (BatteryStatus <> 0)

This WMI Filter users WMI to discover the workstations 'BatteryStatus', If the battery status is not 0 (a battery is present) then consider the device a laptop.


References

http://technet.microsoft.com/en-us/library/cc947846%28v=ws.10%29.aspx