Hi , i am trying to fetch some useful info for laptop battery status and found below analysis but most of them are not working ,
https://bigfix.me/analysis/details/2994755
for example the below relevance is not working:-1:
% battery life in capacity
Period 1 day
* Results in a true/false
Show indented relevance
if not exists (selects "FullChargeCapacity from DCIM_Battery" of wmis "root\dcim\sysman") then ERROR "UNKNOWN" else ( (item 0 of it * 100 / item 1 of it) of (integer value of property "FullChargeCapacity" of it, integer value of property "DesignCapacity" of it) of select objects "* from DCIM_Battery" whose(exists integer values of properties "FullChargeCapacity" of it AND exists integer values of properties "DesignCapacity" of it) of wmis "root\dcim\sysman" )
That WMI provider (root\dcim\sysman) is not a standard WMI namespace, it’s a capability added by the Dell OpenManage software. Are these laptops Dell, and is OpenManage installed?
Look in the Win32_Battery class, there is some battery data in there.
(if (exists wmi whose (exists selects "* from win32_Battery" of it OR exists string value whose (it as lowercase contains "laptop") of selects "ChassisTypes from Win32_SystemEnclosure" of it)) then (relative significance places 2 of (100 - (((string value of select "FullChargedCapacity from BatteryFullChargedCapacity" of wmi "root\WMI" as integer as floating point / string value of select "DesignCapacity from Win32_PortableBattery" of wmi as integer as floating point) * 100))) as string) else ("NoBatteryWMI") | "#Error")