Win32_Battery, ROOT\CIMV2

Class | Methods (2) | Properties (33) | Qualifiers (5) | Instances | Namespaces (2)
Samples: VB Script | C# | VB.Net | Search on:Microsoft

Description

The Win32_Battery class represents a battery connected to the computer system. This class applies to both batteries in Laptop Systems and other internal/external batteries.

Win32_Battery methods

Win32_Battery has 2 methods (2 Derived)

NameOriginReturn
ResetCIM_LogicalDeviceuint32 {'out':True}
SetPowerStateCIM_LogicalDeviceuint32 {'out':True}

Win32_Battery properties

Win32_Battery has 33 properties (2 Local, 31 Derived)

NameOriginCIMType
AvailabilityCIM_LogicalDevice18 [uint16]
BatteryRechargeTimeWin32_Battery19 [uint32]
BatteryStatusCIM_Battery18 [uint16]
CaptionCIM_ManagedSystemElement8 [string]
ChemistryCIM_Battery18 [uint16]
ConfigManagerErrorCodeCIM_LogicalDevice19 [uint32]
ConfigManagerUserConfigCIM_LogicalDevice11 [boolean]
CreationClassNameCIM_LogicalDevice8 [string]
DescriptionCIM_ManagedSystemElement8 [string]
DesignCapacityCIM_Battery19 [uint32]
DesignVoltageCIM_Battery21 [uint64]
key
DeviceID
CIM_LogicalDevice8 [string]
ErrorClearedCIM_LogicalDevice11 [boolean]
ErrorDescriptionCIM_LogicalDevice8 [string]
EstimatedChargeRemainingCIM_Battery18 [uint16]
EstimatedRunTimeCIM_Battery19 [uint32]
ExpectedBatteryLifeWin32_Battery19 [uint32]
ExpectedLifeCIM_Battery19 [uint32]
FullChargeCapacityCIM_Battery19 [uint32]
InstallDateCIM_ManagedSystemElement101 [datetime]
LastErrorCodeCIM_LogicalDevice19 [uint32]
MaxRechargeTimeCIM_Battery19 [uint32]
NameCIM_ManagedSystemElement8 [string]
PNPDeviceIDCIM_LogicalDevice8 [string]
PowerManagementCapabilitiesCIM_LogicalDevice18 [uint16]
PowerManagementSupportedCIM_LogicalDevice11 [boolean]
SmartBatteryVersionCIM_Battery8 [string]
StatusCIM_ManagedSystemElement8 [string]
StatusInfoCIM_LogicalDevice18 [uint16]
SystemCreationClassNameCIM_LogicalDevice8 [string]
SystemNameCIM_LogicalDevice8 [string]
TimeOnBatteryCIM_Battery19 [uint32]
TimeToFullChargeCIM_Battery19 [uint32]

Detailed description of Win32_Battery methods

Derived methods (2) of Win32_Battery class

Reset method
Returnuint32 {'out':True}
Description'Requests a reset of the logical device. The return value should be 0 if the request was successfully executed, 1 if the request is not supported and some other value if an error occurred.'
Reset method is in 105 classes of ROOT\cimv2 and in 19 namespaces
SetPowerState method
Returnuint32 {'out':True}
Parameters
NameCIMTypeIDINOUTQualifiers
PowerStateuint160-{'ValueMap':['1', '2', '3', '4', '5', '6']}
Timedatetime1-
Description'SetPowerState defines the desired power state for a logical device and when a device should be put into that state. The desired power state is specified by setting the PowerState parameter to one of the following integer values: 1="Full Power", 2="Power Save - Low Power Mode", 3="Power Save - Standby", 4="Power Save - Other", 5="Power Cycle" or 6="Power Off". The Time parameter (for all state changes, except 5, "Power Cycle") indicates when the power state should be set, either as a regular date-time value or as an interval value (where the interval begins when the method invocation is received). When the PowerState parameter is equal to 5, "Power Cycle", the Time parameter indicates when the device should power on again. Power off is immediate. SetPowerState should return 0 if successful, 1 if the specified PowerState and Time request is not supported, and some other value if any other error occurred. In a subclass, the set of possible return codes could be specified, using a ValueMap qualifier on the method. The strings to which the ValueMap contents are 'translated' may also be specified in the subclass as a Values array qualifier.'
SetPowerState method is in 106 classes of ROOT\cimv2 and in 14 namespaces

Detailed description of Win32_Battery properties

Local properties (2) of Win32_Battery class

BatteryRechargeTime property
CIMTYPE'uint32'
DEPRECATEDTrue
Description'The BatteryRechargeTime property indicates the time required to fully charge the battery.
The BatteryRechargeTime property has been deprecated. There is no replacementvalue and this property is now considered obsolete.'
MappingStrings['HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services|RechargeRate']
readTrue
Units'minutes'
BatteryRechargeTime property is in 1 class (Win32_Battery) of ROOT\cimv2 and in 2 namespaces
ExpectedBatteryLife property
CIMTYPE'uint32'
DEPRECATEDTrue
Description'The ExpectedBatteryLife property indicates the amount of time it takes to completely drain the battery after it has been fully charged.
The ExpectedBatteryLife property has been deprecated. There is no replacementvalue and this property is now considered obsolete.'
MappingStrings['HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services|BatteryLife']
readTrue
Units'minutes'
ExpectedBatteryLife property is in 1 class (Win32_Battery) of ROOT\cimv2 and in 2 namespaces

Derived properties (31) of Win32_Battery class

Availability property
CIMTYPE'uint16'
Description'The availability and status of the device. For example, the Availability property indicates that the device is running and has full power (value=3), or is in a warning (4), test (5), degraded (10) or power save state (values 13-15 and 17). Regarding the power saving states, these are defined as follows: Value 13 ("Power Save - Unknown") indicates that the device is known to be in a power save mode, but its exact status in this mode is unknown; 14 ("Power Save - Low Power Mode") indicates that the device is in a power save state but still functioning, and may exhibit degraded performance; 15 ("Power Save - Standby") describes that the device is not functioning but could be brought to full power 'quickly'; and value 17 ("Power Save - Warning") indicates that the device is in a warning state, though also in a power save mode.'
MappingStrings['MIF.DMTF|Operational State|003.5', 'MIB.IETF|HOST-RESOURCES-MIB.hrDeviceStatus']
readTrue
ValueMap['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21']
Values['Other', 'Unknown', 'Running/Full Power', 'Warning', 'In Test', 'Not Applicable', 'Power Off', 'Off Line', 'Off Duty', 'Degraded', 'Not Installed', 'Install Error', 'Power Save - Unknown', 'Power Save - Low Power Mode', 'Power Save - Standby', 'Power Cycle', 'Power Save - Warning', 'Paused', 'Not Ready', 'Not Configured', 'Quiesced']
Availability property is in 108 classes of ROOT\cimv2 and in 12 namespaces
BatteryStatus property
CIMTYPE'uint16'
Description'Description of the battery's charge status. Values such as "Fully Charged" (value=3) or "Partially Charged" (11) can be specified. The value, 10, is not valid in the CIM Schema since in DMI it represents that no battery is installed. In this case, this object should not be instantiated.'
MappingStrings['MIF.DMTF|Portable Battery|002.14']
readTrue
ValueMap['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']
Values['Other', 'Unknown', 'Fully Charged', 'Low', 'Critical', 'Charging', 'Charging and High', 'Charging and Low', 'Charging and Critical', 'Undefined', 'Partially Charged']
BatteryStatus property is in 3 classes of ROOT\cimv2 and in 2 namespaces
Caption property
CIMTYPE'string'
Description'The Caption property is a short textual description (one-line string) of the object.'
MaxLen64
readTrue
Caption property is in 1050 classes of ROOT\cimv2 and in 37 namespaces
Chemistry property
CIMTYPE'uint16'
Description'An enumeration that describes the battery's chemistry.'
MappingStrings['MIF.DMTF|Portable Battery|002.7']
readTrue
ValueMap['1', '2', '3', '4', '5', '6', '7', '8']
Values['Other', 'Unknown', 'Lead Acid', 'Nickel Cadmium', 'Nickel Metal Hydride', 'Lithium-ion', 'Zinc air', 'Lithium Polymer']
Chemistry property is in 3 classes of ROOT\cimv2 and in 2 namespaces
ConfigManagerErrorCode property
CIMTYPE'uint32'
Description'Indicates the Win32 Configuration Manager error code. The following values may be returned:
0 This device is working properly.
1 This device is not configured correctly.
2 Windows cannot load the driver for this device.
3 The driver for this device might be corrupted, or your system may be running low on memory or other resources.
4 This device is not working properly. One of its drivers or your registry might be corrupted.
5 The driver for this device needs a resource that Windows cannot manage.
6 The boot configuration for this device conflicts with other devices.
7 Cannot filter.
8 The driver loader for the device is missing.
9 This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly.
10 This device cannot start.
11 This device failed.
12 This device cannot find enough free resources that it can use.
13 Windows cannot verify this device's resources.
14 This device cannot work properly until you restart your computer.
15 This device is not working properly because there is probably a re-enumeration problem.
16 Windows cannot identify all the resources this device uses.
17 This device is asking for an unknown resource type.
18 Reinstall the drivers for this device.
19 Your registry might be corrupted.
20 Failure using the VxD loader.
21 System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device.
22 This device is disabled.
23 System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation.
24 This device is not present, is not working properly, or does not have all its drivers installed.
25 Windows is still setting up this device.
26 Windows is still setting up this device.
27 This device does not have valid log configuration.
28 The drivers for this device are not installed.
29 This device is disabled because the firmware of the device did not give it the required resources.
30 This device is using an Interrupt Request (IRQ) resource that another device is using.
31 This device is not working properly because Windows cannot load the drivers required for this device.'
readTrue
ValueMap['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
Values['This device is working properly.', 'This device is not configured correctly.', 'Windows cannot load the driver for this device.', 'The driver for this device might be corrupted, or your system may be running low on memory or other resources.', 'This device is not working properly. One of its drivers or your registry might be corrupted.', 'The driver for this device needs a resource that Windows cannot manage.', 'The boot configuration for this device conflicts with other devices.', 'Cannot filter.', 'The driver loader for the device is missing.', 'This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly.', 'This device cannot start.', 'This device failed.', 'This device cannot find enough free resources that it can use.', 'Windows cannot verify this device's resources.', 'This device cannot work properly until you restart your computer.', 'This device is not working properly because there is probably a re-enumeration problem.', 'Windows cannot identify all the resources this device uses.', 'This device is asking for an unknown resource type.', 'Reinstall the drivers for this device.', 'Failure using the VxD loader.', 'Your registry might be corrupted.', 'System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device.', 'This device is disabled.', 'System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation.', 'This device is not present, is not working properly, or does not have all its drivers installed.', 'Windows is still setting up this device.', 'Windows is still setting up this device.', 'This device does not have valid log configuration.', 'The drivers for this device are not installed.', 'This device is disabled because the firmware of the device did not give it the required resources.', 'This device is using an Interrupt Request (IRQ) resource that another device is using.', 'This device is not working properly because Windows cannot load the drivers required for this device.']
ConfigManagerErrorCode property is in 104 classes of ROOT\cimv2 and in 2 namespaces
ConfigManagerUserConfig property
CIMTYPE'boolean'
Description'Indicates whether the device is using a user-defined configuration.'
readTrue
ConfigManagerUserConfig property is in 104 classes of ROOT\cimv2 and in 2 namespaces
CreationClassName property
CIM_KeyTrue
CIMTYPE'string'
Description'CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.'
readTrue
CreationClassName property is in 178 classes of ROOT\cimv2 and in 20 namespaces
Description property
CIMTYPE'string'
Description'The Description property provides a textual description of the object. '
readTrue
Description property is in 1061 classes of ROOT\cimv2 and in 142 namespaces
DesignCapacity property
CIMTYPE'uint32'
Description'The design capacity of the battery in milliwatt-hours. If this property is not supported, enter 0.'
MappingStrings['MIF.DMTF|Portable Battery|002.8']
readTrue
Units'milliwatt-hours'
DesignCapacity property is in 3 classes of ROOT\cimv2 and in 2 namespaces
DesignVoltage property
CIMTYPE'uint64'
Description'The design voltage of the battery in millivolts. If this attribute is not supported, enter 0.'
MappingStrings['MIF.DMTF|Portable Battery|002.9']
readTrue
Units'millivolts'
DesignVoltage property is in 3 classes of ROOT\cimv2 and in 2 namespaces
DeviceID property
CIM_KeyTrue
CIMTYPE'string'
Description'The DeviceID property contains a string identifying the battery.
Example: Internal Battery'
keyTrue
MappingStrings['WMI']
Override'DeviceId'
readTrue
DeviceID property is in 108 classes of ROOT\cimv2 and in 21 namespaces
ErrorCleared property
CIMTYPE'boolean'
Description'ErrorCleared is a boolean property indicating that the error reported in LastErrorCode property is now cleared.'
readTrue
ErrorCleared property is in 104 classes of ROOT\cimv2 and in 12 namespaces
ErrorDescription property
CIMTYPE'string'
Description'ErrorDescription is a free-form string supplying more information about the error recorded in LastErrorCode property, and information on any corrective actions that may be taken.'
readTrue
ErrorDescription property is in 106 classes of ROOT\cimv2 and in 142 namespaces
EstimatedChargeRemaining property
CIMTYPE'uint16'
Description'An estimate of the percentage of full charge remaining.'
readTrue
Units'percent'
EstimatedChargeRemaining property is in 4 classes of ROOT\cimv2 and in 2 namespaces
EstimatedRunTime property
CIMTYPE'uint32'
Description'EstimatedRunTime is an estimate in minutes of the time to battery charge depletion under the present load conditions if the utility power is off, or lost and remains off, or a Laptop is disconnected from a power source.'
MappingStrings['MIF.DMTF|Portable Battery|002.15']
readTrue
Units'minutes'
EstimatedRunTime property is in 4 classes of ROOT\cimv2 and in 2 namespaces
ExpectedLife property
CIMTYPE'uint32'
Description'Indicates the battery's expected lifetime in minutes, assuming that the battery is fully charged. This property represents the total expected life of the battery, not its current remaining life, which is indicated by the EstimatedRunTime property. '
readTrue
Units'minutes'
ExpectedLife property is in 3 classes of ROOT\cimv2 and in 2 namespaces
FullChargeCapacity property
CIMTYPE'uint32'
Description'The full charge capacity of the battery in milliwatt-hours. Comparison of this value to the DesignCapacity property determines when the battery requires replacement. A battery's end of life is typically when the FullChargeCapacity property falls below 80% of the DesignCapacity property. If this property is not supported, enter 0.'
MappingStrings['MIF.DMTF|Portable Battery|002.11']
readTrue
Units'milliwatt-hours'
FullChargeCapacity property is in 3 classes of ROOT\cimv2 and in 2 namespaces
InstallDate property
CIMTYPE'datetime'
Description'The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.'
MappingStrings['MIF.DMTF|ComponentID|001.5']
readTrue
InstallDate property is in 227 classes of ROOT\cimv2 and in 23 namespaces
LastErrorCode property
CIMTYPE'uint32'
Description'LastErrorCode captures the last error code reported by the logical device.'
readTrue
LastErrorCode property is in 104 classes of ROOT\cimv2 and in 16 namespaces
MaxRechargeTime property
CIMTYPE'uint32'
Description'MaxRechargeTime indicates the maximum time, in minutes, to fully charge the battery. This property represents the time to recharge a fully depleted battery, not the current remaining charging time, which is indicated in the TimeToFullCharge property. '
readTrue
Units'minutes'
MaxRechargeTime property is in 3 classes of ROOT\cimv2 and in 2 namespaces
Name property
CIMTYPE'string'
Description'The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.'
readTrue
Name property is in 1046 classes of ROOT\cimv2 and in 142 namespaces
PNPDeviceID property
CIMTYPE'string'
Description'Indicates the Win32 Plug and Play device ID of the logical device. Example: *PNP030b'
readTrue
PNPDeviceID property is in 104 classes of ROOT\cimv2 and in 6 namespaces
PowerManagementCapabilities property
CIMTYPE'uint16'
Description'Indicates the specific power-related capabilities of the logical device. The array values, 0="Unknown", 1="Not Supported" and 2="Disabled" are self-explanatory. The value, 3="Enabled" indicates that the power management features are currently enabled but the exact feature set is unknown or the information is unavailable. "Power Saving Modes Entered Automatically" (4) describes that a device can change its power state based on usage or other criteria. "Power State Settable" (5) indicates that the SetPowerState method is supported. "Power Cycling Supported" (6) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 ("Power Cycle"). "Timed Power On Supported" (7) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 ("Power Cycle") and the Time parameter set to a specific date and time, or interval, for power-on.'
readTrue
Values['Unknown', 'Not Supported', 'Disabled', 'Enabled', 'Power Saving Modes Entered Automatically', 'Power State Settable', 'Power Cycling Supported', 'Timed Power On Supported']
PowerManagementCapabilities property is in 106 classes of ROOT\cimv2 and in 14 namespaces
PowerManagementSupported property
CIMTYPE'boolean'
Description'Boolean indicating that the Device can be power managed - ie, put into a power save state. This boolean does not indicate that power management features are currently enabled, or if enabled, what features are supported. Refer to the PowerManagementCapabilities array for this information. If this boolean is false, the integer value 1, for the string, "Not Supported", should be the only entry in the PowerManagementCapabilities array.'
readTrue
PowerManagementSupported property is in 106 classes of ROOT\cimv2 and in 14 namespaces
SmartBatteryVersion property
CIMTYPE'string'
Description'The Smart Battery Data Specification version number supported by this battery. If the battery does not support this function, the value should be left blank.'
MappingStrings['MIF.DMTF|Portable Battery|002.10']
MaxLen64
readTrue
SmartBatteryVersion property is in 3 classes of ROOT\cimv2 and in 2 namespaces
Status property
CIMTYPE'string'
Description'The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "Starting", "Stopping" and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.'
MaxLen10
readTrue
ValueMap['OK', 'Error', 'Degraded', 'Unknown', 'Pred Fail', 'Starting', 'Stopping', 'Service', 'Stressed', 'NonRecover', 'No Contact', 'Lost Comm']
Values['OK', 'Error', 'Degraded', 'Unknown', 'Pred Fail', 'Starting', 'Stopping', 'Service', 'Stressed', 'NonRecover', 'No Contact', 'Lost Comm']
Status property is in 230 classes of ROOT\cimv2 and in 42 namespaces
StatusInfo property
CIMTYPE'uint16'
Description'StatusInfo is a string indicating whether the logical device is in an enabled (value = 3), disabled (value = 4) or some other (1) or unknown (2) state. If this property does not apply to the logical device, the value, 5 ("Not Applicable"), should be used.'
MappingStrings['MIF.DMTF|Operational State|003.3']
readTrue
ValueMap['1', '2', '3', '4', '5']
Values['Other', 'Unknown', 'Enabled', 'Disabled', 'Not Applicable']
StatusInfo property is in 104 classes of ROOT\cimv2 and in 12 namespaces
SystemCreationClassName property
CIM_KeyTrue
CIMTYPE'string'
Description'The scoping System's CreationClassName.'
Propagated'CIM_System.CreationClassName'
readTrue
SystemCreationClassName property is in 122 classes of ROOT\cimv2 and in 20 namespaces
SystemName property
CIM_KeyTrue
CIMTYPE'string'
Description'The scoping System's Name.'
Propagated'CIM_System.Name'
readTrue
SystemName property is in 122 classes of ROOT\cimv2 and in 22 namespaces
TimeOnBattery property
CIMTYPE'uint32'
Description'TimeOnBattery indicates the elapsed time in seconds since the computer system's UPS last switched to battery power, or the time since the system or UPS was last restarted, whichever is less. Zero shall be returned if the battery is 'on line'.'
readTrue
Units'seconds'
TimeOnBattery property is in 3 classes of ROOT\cimv2 and in 2 namespaces
TimeToFullCharge property
CIMTYPE'uint32'
Description'The remaining time to charge the battery fully in minutes at the current charging rate and usage.'
MappingStrings['MIF.DMTF|Portable Battery|002.16']
readTrue
Units'minutes'
TimeToFullCharge property is in 3 classes of ROOT\cimv2 and in 2 namespaces

Win32_Battery Qualifiers

NameValueToInstanceToSubclassOverridableAmendedLocal
Description'The Win32_Battery class represents a battery connected to the computer system. This class applies to both batteries in Laptop Systems and other internal/external batteries.'
dynamicTrue
Locale1033
provider'CIMWin32'
UUID'{8502C4B9-5FBB-11D2-AAC1-006008C78BC7}'

Win32_Battery System properties

NameValueOriginCIMTypeLocalArray
__PATH'\\.\ROOT\cimv2:Win32_Battery'___SYSTEM8
__NAMESPACE'ROOT\cimv2'___SYSTEM8
__SERVER'.'___SYSTEM8
__DERIVATION['CIM_Battery', 'CIM_LogicalDevice', 'CIM_LogicalElement', 'CIM_ManagedSystemElement']___SYSTEM8
__PROPERTY_COUNT33___SYSTEM3
__RELPATH'Win32_Battery'___SYSTEM8
__DYNASTY'CIM_ManagedSystemElement'___SYSTEM8
__SUPERCLASS'CIM_Battery'___SYSTEM8
__CLASS'Win32_Battery'___SYSTEM8
__GENUS1___SYSTEM3

Similar Classes to Win32_Battery

Number of classes:3
Class nameChildsPropertiesMethodsClass
Instances
Child
Instances
AbstractSingleton
CIM_AssociatedBattery020---
CIM_Battery2312---
Win32_PortableBattery0362----
comments powered by Disqus
WUtils.com