Is this set of BAT files still considered state-or-the-art?


Some scripts cannot be fully tested unless there are existing files (addit dump files)

Yep, I could only find a few machines at work to test. I don't have any .dmp files myself, which is good I guess.

a) sequence newest report to oldest

b) have a popup text result (without searching desktop for the text)

c) for the report name if popup is not possible chkdisk > chkdsk

a) I noticed that and forgot to fix it. Whoops.
c) Not sure why I typed "disk." Weird.

Anyway, a-c have been fixed. I'm pushing them up to GitHub after I post this.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
I've already converted a couple of them to PowerShell. The tuneup one is going to be fun, along with the diskpart partition info one.
Any tools you can recommend?
 

My Computer My Computer

At a glance

Windows 11 2H25AMD 9900X64 GBAMD 9070 XT
OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
The prior created files for powercfg were modified by Microsoft.


Old:
battery-report
energy-report
powercfg-info.txt
sleep-diagnostics-report.html
sleep-study-report.html
system-power-report.html


New:
sleep-study-report.html = system-power-report.html

sleep-study-report.html has become a duplicate file



Undecided: pro /con

a) result pop ups
b) results saved to desktop
c) both
 

My Computer My Computer

At a glance

Windows 10Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz16 GB Total: Manufacturer : Samsung MemoryTyp...NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
OS
Windows 10
Computer type
Laptop
Manufacturer/Model
HP
CPU
Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
Motherboard
Product : 190A Version : KBC Version 94.56
Memory
16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
Graphics Card(s)
NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
Sound Card
IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
Hard Drives
Model Hitachi HTS727575A9E364
Antivirus
Microsoft Defender
Other Info
Mobile Workstation
Yep one of the powercfg switches is deprecated (not on a PC at the moment to check). I’m mostly just trying to re-create the batch files in PowerShell right now. We can make functionality changes too along the way.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Some additional notes about the original batch file version of the PowerCfg reports gatherer:

  • It runs powercfg /A and powercfg /availablesleepstates, which are the same thing. The PowerShell-based script skips the /A one.
  • powercfg /energy /duration 10 - Generates a log in the user's profile (energy-report.html)
  • powercfg /batteryreport - Generates a log in the user's profile (battery-report.html)
  • powercfg /sleepstudy - Generates a log in the user's profile (sleepstudy-report.html)
  • powercfg /systemsleepdiagnostics - This is the deprecated command mentioned above. It should probably be removed.
  • powercfg /systempowerreport - Generates a log in the user's profile (sleepstudy-report.html), the same report as /sleepstudy. One or the other can probably be removed.
  • Tries to gather the following files, which did not exist after I ran it on several stations. Note that it's trying to gather files from System32, but the powercfg commands it uses are generating reports in a different location.
    • %WinDir%\system32\energy-report.html
    • %WinDir%\system32\battery-report.html
    • %WinDir%\system32\sleepstudy-report.html
    • %WinDir%\system32\system-sleep-diagnostics.html
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2

My Computer My Computer

At a glance

Windows 11 2H25AMD 9900X64 GBAMD 9070 XT
OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
Converting BAT files to PS.
Probably any decent LLM these days, really. GitHub Copilot, Claude, etc., something good at code. That’s if you just want to convert from one to the other.

I’m also looking at what the original batch files do, and trying to determine the intent, not just what the lines of code do. That still takes a human, for now.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2

Latest Support Threads

Back
Top Bottom