きっかけ
電源接続中なのにバッテリーが減る場合があるので,まず状態を確認したい.
減る場合っていうのはこれ↓
コマンド
PowerShellでコマンドを実行する.
WMIC Path Win32_Battery Get BatteryStatus /Format:List
表示結果
結果はこんな感じ
BatteryStatus=2
で,何?
数字だけ出されても意味わかんないよ~
BatteryStatus
Data type: uint16
Access type: Read-only
Qualifiers: MappingStrings ("MIF.DMTF|Portable Battery|002.14")
Status of the battery. The value 10 (Undefined) is not valid in the CIM schema because in DMI it represents that no battery is installed. In this case, the object should not be instantiated.
This property is inherited from CIM_Battery.
Other (1)
The battery is discharging.
Unknown (2)
The system has access to AC so no battery is being discharged. However, the battery is not necessarily charging.
Fully Charged (3)
Low (4)
Critical (5)
Charging (6)
Charging and High (7)
Charging and Low (8)
Charging and Critical (9)
Undefined (10)
Partially Charged (11)
つまり?
BatteryStatusが
1:バッテリー駆動
2:AC駆動
実際の現象に対して
電源繋いでるのにバッテリー減る問題がまだ発生していないので,全く活かされていない
❗要検証❗