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,