Windows 笔记本电池报告获取

文章最后更新时间:2024-12-08 11:47:48

在使用计算机的过程中我们可能会遇到需要了解电池工作状态、使用时间并预防故障的情况,那么可以使用 Windows 的 PowerShell 命令行实用工具来获取电池使用情况报告。

  • 点击任务栏搜索按钮,或同时按下 [Win+Q] 键,打开搜索,输入 powershell,鼠标左键点击搜索结果的 以管理员身份运行
image.png
  • 复制以下命令,在打开的并在 Windows Powershell 窗口中点击鼠标右键,程序将开始粘贴复制的命令,当命令停止滚动时即表示粘贴完成,此时按下回车键(Enter)执行
$HTML=[System.Environment]::GetFolderPath('Desktop')+"\"+(Get-Date -Format 'yyyy-MM-dd')+"-电池记录.html";POWERCFG /BATTERYREPORT /OUTPUT "$HTML";$TF=Get-Content "$HTML";$TF| %{$_.Replace("Battery report","电池报告")}| %{$_.Replace("COMPUTER NAME","计算机名")}| %{$_.Replace("SYSTEM PRODUCT NAME","计算机型号")}| %{$_.Replace("OS BUILD","操作系统内部版本")}| %{$_.Replace("PLATFORM ROLE","平台角色")}| %{$_.Replace("CONNECTED STANDBY","InstantGo(连接待机)")}| %{$_.Replace("REPORT TIME","报告时间")}| %{$_.Replace("Installed batteries","已安装的电池")}| %{$_.Replace("Information about each currently installed battery","查看当前已安装电池的信息")}| %{$_.Replace("NAME","名称")}| %{$_.Replace("MANUFACTURER","制造商")}| %{$_.Replace("SERIAL NUMBER","序列号")}| %{$_.Replace("CHEMISTRY","化学成分")}| %{$_.Replace("AT DESIGN CAPACITY","设计容量时")}| %{$_.Replace("DESIGN CAPACITY","设计容量")}| %{$_.Replace("FULL CHARGE CAPACITY","完全充电容量")}| %{$_.Replace("CYCLE COUNT","循环计数")}| %{$_.Replace("Recent usage","最近使用情况")}| %{$_.Replace("Power states over the last 3 days","过去72小时内的电源状态")}| %{$_.Replace("START TIME","开始时间")}| %{$_.Replace("STATE","状态")}| %{$_.Replace("SOURCE","电源")}| %{$_.Replace("CAPACITY REMAINING","剩余容量")}| %{$_.Replace("Battery usage","电池使用情况")}| %{$_.Replace("Battery drains over the last 3 days","过去72小时内的电池消耗")}| %{$_.Replace("DURATION","使用时间")}| %{$_.Replace("ENERGY DRAINED","消耗的能量")}| %{$_.Replace("Usage history","使用历史记录")}| %{$_.Replace("History of system usage on AC and battery","有关交流电源和电池的使用记录")}| %{$_.Replace("BATTERY DURATION","电池使用时间")}| %{$_.Replace("AC DURATION ","交流电源使用时间")}| %{$_.Replace("PERIOD","周期")}| %{$_.Replace("ACTIVE","活动")}| %{$_.Replace("Battery capacity history","电池设计容量历史记录")}| %{$_.Replace("Charge capacity history of the system's batteries","电池充电能力历史记录")}| %{$_.Replace("Battery life estimates based on observed drains","以观察到的消耗情况预计电池寿命")}| %{$_.Replace("Battery life estimates","预计电池寿命")}| %{$_.Replace("AT FULL CHARGE","完全充电时")}| %{$_.Replace("Current estimate of battery life based on all observed drains since OS install","以操作系统安装后所有观察到的消耗记录为基础预计的当前电池寿命")}| %{$_.Replace("Since OS install","从操作系统安装后")}| %{$_.Replace("Supported","支持")}| %{$_.Replace("Not supported","不支持")}| %{$_.Replace("BATTERY","电池")}| %{$_.Replace("Suspended","已暂停")}| %{$_.Replace("Active","活动")}| %{$_.Replace("Unspecified","未知")}| %{$_.Replace("Mobile","移动")}| %{$_.Replace("Desktop","桌面")}| %{$_.Replace("Workstation","工作站")}| %{$_.Replace("Report generated","生成当前报告")}| %{$_.Replace("Battery","电池")}| %{$_.Replace("AC","交流电源")}|Out-File "$HTML";pause
  • 当显示“按 Enter 键继续…:”时就表示已经生成了电池报告(简体中文),您可以在桌面上找到并打开生成的报告:<当前日期>-电池记录.html
image.png
电池报告.png

网站所发布的所有资源均来源于互联网搬运,承诺不做二次修改。
© 版权声明
THE END
喜欢就支持一下吧
点赞0