Solved Battery Report using Powershell. Can not find the file created.

Mooly

Member
VIP
Local time
10:53 PM
Posts
62
I ran the following using Powershell which is taken from a TUT over in W10. It should save the file to 'Downloads'.

Running in W11 I get this which is what I would expect, but I can not find the file anywhere. It is not in Downloads and a search for 'Batteryrpt' does not find anything.

This is the command run and its output.

powercfg /batteryreport /output %USERPROFILE%\Downloads\BatteryRpt.html

Code:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\WINDOWS\system32> powercfg /batteryreport /output %USERPROFILE%\Downloads\BatteryRpt.html
Battery life report saved to file path C:\WINDOWS\system32\%USERPROFILE%\Downloads\BatteryRpt.html.
PS C:\WINDOWS\system32>
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Fabler2

Well-known member
Member
VIP
Local time
10:53 PM
Posts
571
I just use the powercfg /batteryreport command in CMD admin. In file explorer paste C:\Windows\System32\ and scroll down to the report.

Screenshot_1.png
 

My Computers

System One System Two

  • Operating System
    Win 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    INTEL SSD 660p 512GB NVMe
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    16 GB (2 x 8 GB) DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    1.024 TB SSD M.2 2280 - Samsung
    PSU
    180 Watt, 19.5 V
    Mouse
    Logitech
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
Hmmm... it doesn't seem to be present for me.

Screenshot 2021-07-14 133253.jpg
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
More...

If I run your command of powercfg /batteryreport then I get a report in my users folder but it does not show in the system32 location.

Screenshot 2021-07-14 134052.jpg
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Fabler2

Well-known member
Member
VIP
Local time
10:53 PM
Posts
571
Ah, I used CMD admin if not check C:\Users\your name\battery-report.html
 

My Computers

System One System Two

  • Operating System
    Win 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    INTEL SSD 660p 512GB NVMe
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    16 GB (2 x 8 GB) DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    1.024 TB SSD M.2 2280 - Samsung
    PSU
    180 Watt, 19.5 V
    Mouse
    Logitech
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender

Fabler2

Well-known member
Member
VIP
Local time
10:53 PM
Posts
571
👍
 

My Computers

System One System Two

  • Operating System
    Win 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    INTEL SSD 660p 512GB NVMe
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    16 GB (2 x 8 GB) DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    1.024 TB SSD M.2 2280 - Samsung
    PSU
    180 Watt, 19.5 V
    Mouse
    Logitech
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
Doing that finds the report done using your code but does not show the ones I did.

If I search for .html I see the one just created but no mention of mine.

Screenshot 2021-07-14 134716.jpg
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
More...

The original code seems to work in cmd.exe but not Powershell. Just tried again and this has generated a report straight to Downloads. So the Powershell ones are missing in action.
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
Tried again. Note the difference in the filepath that the command writes to. Just tried them both again and only cmd works for me.

Screenshot 2021-07-14 135256.jpgScreenshot 2021-07-14 135348.jpg
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Fabler2

Well-known member
Member
VIP
Local time
10:53 PM
Posts
571
Yes.. Works in Windows Terminal.
Choice, choices.... :)
 

My Computers

System One System Two

  • Operating System
    Win 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    INTEL SSD 660p 512GB NVMe
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    16 GB (2 x 8 GB) DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    1.024 TB SSD M.2 2280 - Samsung
    PSU
    180 Watt, 19.5 V
    Mouse
    Logitech
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
Could it be trying to write to a protected folder?

Yes, choices choices LOL.
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Bree

Well-known member
Power User
VIP
Local time
10:53 PM
Posts
910
Location
S/E England, UK
I ran the following using Powershell which is taken from a TUT over in W10. It should save the file to 'Downloads'.
...This is the command run and its output.

powercfg /batteryreport /output %USERPROFILE%\Downloads\BatteryRpt.html
The problem is that you are trying to use a command prompt syntax in Powershell. In particular, its the %userprofile% environment variable that's the issue, PS won't replace it with it's correct value. The same command run in a Command Prompt window works. You can switch a PS window to a Cmd one by running cmd.exe.

1626267708772.png

Note how the command prompt uses the correct path in the above screenshot, while Powershell failed to replace %userprofile% and tried to use it 'as is' for the path.
 

My Computers

System One System Two

  • Operating System
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB HDD
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October.


    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, Windows 11 Pro.
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Lattitude E4310
    CPU
    i5 M 520
    Motherboard
    0T6M8G
    Memory
    4GB
    Screen Resolution
    1366x768
    Hard Drives
    500GB HDD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround.


    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, Windows 11 Pro.

Fabler2

Well-known member
Member
VIP
Local time
10:53 PM
Posts
571
Don't really know as Windows Terminal shows as Windows PowerShell :cautious:

Screenshot_3.png

1626267886265.png
 

My Computers

System One System Two

  • Operating System
    Win 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
    CPU
    AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Motherboard
    ASUSTeK COMPUTER INC. X509DA (FP5)
    Memory
    12GB
    Graphics Card(s)
    RX Vega 10 Graphics
    Monitor(s) Displays
    Generic PnP Monitor (1920x1080@60Hz)
    Screen Resolution
    1920x1080@60Hz
    Hard Drives
    INTEL SSD 660p 512GB NVMe
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    16 GB (2 x 8 GB) DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    1.024 TB SSD M.2 2280 - Samsung
    PSU
    180 Watt, 19.5 V
    Mouse
    Logitech
    Internet Speed
    25 Mbps
    Browser
    Edge
    Antivirus
    Defender

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
The problem is that you are trying to use a command prompt syntax in Powershell. In particular, its the %userprofile% environment variable that's the issue, PS won't replace it with it's correct value. The same command run in a Command Prompt window works. You can switch a PS window to a Cmd one by running cmd.exe.
Thanks (and to everyone for trying this). I'm beginning to see what you mean here... so have the other reports actually been placed 'somewhere' or were they never created in the first place.
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Bree

Well-known member
Power User
VIP
Local time
10:53 PM
Posts
910
Location
S/E England, UK
have the other reports actually been placed 'somewhere' or were they never created in the first place.
Nowhere - the path containing the string '%userprofile%' was invalid so the file couldn't be created.
 

My Computers

System One System Two

  • Operating System
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB HDD
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October.


    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, Windows 11 Pro.
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Lattitude E4310
    CPU
    i5 M 520
    Motherboard
    0T6M8G
    Memory
    4GB
    Screen Resolution
    1366x768
    Hard Drives
    500GB HDD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround.


    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, Windows 11 Pro.

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
OK, that makes sense.

So it looks like mystery solved then :)

I'll mark this resolved and give my head a rest...
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

johnlgalt

Antidisestablishmentarianistentarianist
Power User
VIP
Local time
5:53 PM
Posts
1,922
Location
3rd Rock
Interesting.

As used, it pre-pends whatever directory you're located in to the path. If you add a leading \ to the path, it uses the current drive letter plus the path.

This happens in Powershell, Powershell (Admin) and the new Powershell 7.

That's why this tutorial Generate Battery Usage Report in Windows 10 says use command prompt. Also with this one too: Create Power Efficiency Diagnostics Report in Windows 10

I looked a bit deeper into PS and file output is a bit more complicated. The Powercfg.exe does work in PS, but sending it to a file (with a path) it where it runs into problems, especially when using that command as written.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * Corsair Vengeance 32 GB 3600 MHz
    Graphics Card(s)
    eVGA GeForce GTX 970 SSC ACX 2.0 (04G-P4-3979-KB)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2 * Lenovo LT2323pwA Widescreeen
    Screen Resolution
    2* 1920*1080
    Hard Drives
    3x Sabrent Rocket PCIe Gen4 NVMe M.2 1 TB SSD (SB-ROCKET-NVMe4-1TB)
    SanDisk Ultra SDSSDHII-960G-G25 960 GB SATA III SSD
    Crucial MX100 CT256MX100SSD1 256GB SATA III SSD
    2 * Seagate Barracuda 7200.12 ST31000528AS 1TB 7200 RPM --> RAID1
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
  • Operating System
    Windows 10 x64 Pro build 21H1
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryvill 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master (shared) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex
    Browser
    Edge Chromium | Chrome | Firefox Nightly | Brave
    Antivirus
    Defender + MB4

Mooly

Member
VIP
Thread Starter
Local time
10:53 PM
Posts
62
And just to add to this...

I found a battery report from when I first ran this some 2 years ago. Compare with current results. It can not be correct as there is no change in capacity showing.

Screenshot 2021-07-15 090614.jpgScreenshot 2021-07-15 090711.jpg
 

My Computer

System One

  • Operating System
    W11 Pro x64 21H2 22000.51
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3750 17"
    CPU
    Early i5
    Motherboard
    Unknown
    Memory
    8Gb
    Graphics Card(s)
    Intel Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    Internal
    Hard Drives
    500Gb Crucial SSD
    Internet Speed
    50Mbps
    Browser
    Edge
    Other Info
    Legacy BIOS. No TPM

Try3

Member
Member
VIP
Local time
10:53 PM
Posts
94
I ran the following using Powershell which is taken from a TUT over in W10. It should save the file to 'Downloads'.

powercfg /batteryreport /output %USERPROFILE%\Downloads\BatteryRpt.html

The PS equivalent of that Cmd would be
Code:
powercfg /batteryreport /output $env:userprofile\Downloads\BatteryRpt.html

Denis
 

My Computer

System One

  • Operating System
    Windows 11 Home x64 Version 21H2 Build 22000.194

johnlgalt

Antidisestablishmentarianistentarianist
Power User
VIP
Local time
5:53 PM
Posts
1,922
Location
3rd Rock
Yup - I did a lot of reading on this, and from what I read, it seems that if you can pipe in an Out-File command into the statement in PS, it allows the use of the variable using the %var% placeholder, but if it is a redirect from the output of a command, then you have to use the $ENV:{var} method for it to get redirected correctly.

Thanks for this. It just helped in another thread too.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * Corsair Vengeance 32 GB 3600 MHz
    Graphics Card(s)
    eVGA GeForce GTX 970 SSC ACX 2.0 (04G-P4-3979-KB)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2 * Lenovo LT2323pwA Widescreeen
    Screen Resolution
    2* 1920*1080
    Hard Drives
    3x Sabrent Rocket PCIe Gen4 NVMe M.2 1 TB SSD (SB-ROCKET-NVMe4-1TB)
    SanDisk Ultra SDSSDHII-960G-G25 960 GB SATA III SSD
    Crucial MX100 CT256MX100SSD1 256GB SATA III SSD
    2 * Seagate Barracuda 7200.12 ST31000528AS 1TB 7200 RPM --> RAID1
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
  • Operating System
    Windows 10 x64 Pro build 21H1
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryvill 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master (shared) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex
    Browser
    Edge Chromium | Chrome | Firefox Nightly | Brave
    Antivirus
    Defender + MB4
Top Bottom