Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

WMI filter / WQL that excludes laptops?

$
0
0

I've been working on a WMI filter for GPOs that should exclude laptops and noticed that win32_portablebattery is probably the best class to check for this (particularly since win32_battery's properties have values if there is a UPS attached via USB).


The issue I am seeing is that on workstations and servers, win32_portablebattery returns no values (not NULL),


Specifically, I am attempting to test:

select caption from win32_portablebattery where caption = ""

and

select caption from win32_portablebattery where __CLASS is null

and

select caption from win32_portablebattery where __CLASS = ""


Our servers and workstations fail to qualify for this query.


Has anyone successfully written a WMI Filter/WQL that excludes laptops?



Thanks,


Matt

Viewing all articles
Browse latest Browse all 15028

Trending Articles