Reference for Win32_Battery
(Diese Seite wurde noch nicht auf das neue Layout umgestellt!)

Select by Class Type Search by Keyword
Show all classes

Category (Kategorie):

Batteries and Power Supplies

Description (Beschreibung):

The Win32_Battery WMI class represents a battery connected to the computer system. Windows 2000 and Windows 98 do not report instances of Win32_Battery unless Advanced Power Management (APM) is enabled on the system, and a battery is present.

Availability (Verfügbarkeit):

WMI Class NameWindows Server 2003Windows XP ProfessionalWindows 2000Windows NT 4.0Windows 98
Win32_BatteryYesYesYesYesYes

Properties (Attribute):

ItemServer 2003XP ProWindows 2000NT 4.0Windows 98
AvailabilityYesYesYesYesYes
BatteryRechargeTimeYesYesYesYesYes
BatteryStatusYesYesYesYesYes
CaptionYesYesYesYesYes
ChemistryYesYesYesYesYes
ConfigManagerErrorCodeYesYesYesYesYes
ConfigManagerUserConfigYesYesYesYesYes
CreationClassNameYesYesYesYesYes
DescriptionYesYesYesYesYes
DesignCapacityYesYesYesYesYes
DesignVoltageYesYesYesYesYes
DeviceIDYesYesYesYesYes
ErrorClearedYesYesYesYesYes
ErrorDescriptionYesYesYesYesYes
EstimatedChargeRemainingYesYesYesYesYes
EstimatedRunTimeYesYesYesYesYes
ExpectedBatteryLifeYesYesYesYesYes
ExpectedLifeYesYesYesYesYes
FullChargeCapacityYesYesYesYesYes
InstallDateYesYesYesYesYes
LastErrorCodeYesYesYesYesYes
MaxRechargeTimeYesYesYesYesYes
NameYesYesYesYesYes
PNPDeviceIDYesYesYesYesYes
PowerManagementCapabilitiesYesYesYesYesYes
PowerManagementSupportedYesYesYesYesYes
SmartBatteryVersionYesYesYesYesYes
StatusYesYesYesYesYes
StatusInfoYesYesYesYesYes
SystemCreationClassNameYesYesYesYesYes
SystemNameYesYesYesYesYes
TimeOnBatteryYesYesYesYesYes
TimeToFullChargeYesYesYesYesYes

Methods (Methoden):

ItemServer 2003XP ProWindows 2000NT 4.0Windows 98
ResetYesYesYesYesYes
SetPowerStateYesYesYesYesYes

Sample Code (Beispiel):

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Battery")
For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
Next

Links:

Link zur Original-Microsoft-Dokumentation