Chapters:
“Day 0 health check” (battery = green, temp = 24 °C)
-
Vantage = battery care (Conservation Mode, Rapid Charge).
-
Windows Settings → Power & battery = the real deal for screen/sleep timers.
or
Quick one-shot (creates C:\FredChecks\fred-YYYYMMDD-HHMM.txt)
$ts = Get-Date -Format "yyyyMMdd-HHmm"
$dir = "C:\FredChecks"; if (!(Test-Path $dir)) { New-Item -Type Directory $dir | Out-Null }
$log = "$dir\fred-$ts.txt"
"== FRED HEALTH CHECK $((Get-Date)) ==" | Tee-Object -FilePath $log
"--- System & OS ---" | Tee-Object -FilePath $log -Append
Get-ComputerInfo | Select-Object CsManufacturer,CsModel,WindowsProductName,OsVersion,OsBuildNumber |
Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Uptime & CPU load (5s avg) ---" | Tee-Object -FilePath $log -Append
(Get-CimInstance Win32_OperatingSystem | Select-Object @{n='Uptime';e={(Get-Date)-($_.LastBootUpTime)}}) |
Format-List | Out-String | Tee-Object -FilePath $log -Append
(Get-Counter '\Processor(_Total)\% Processor Time' -Sample 5 -Continuous:$false).CounterSamples |
Measure-Object -Property CookedValue -Average | Select @{n='CPU_%_Avg(5s)';e={[math]::Round($_.Average,1)}} |
Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Memory ---" | Tee-Object -FilePath $log -Append
Get-CimInstance Win32_OperatingSystem |
Select-Object @{n='TotalGB';e={[math]::Round($_.TotalVisibleMemorySize/1MB,1)}},
@{n='FreeGB'; e={[math]::Round($_.FreePhysicalMemory/1MB,1)}},
@{n='UsedGB'; e={[math]::Round(($_.TotalVisibleMemorySize-$_.FreePhysicalMemory)/1MB,1)}} |
Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Disks ---" | Tee-Object -FilePath $log -Append
Get-Volume | Where-Object DriveLetter | Select DriveLetter, FileSystemLabel, SizeRemaining, Size |
Sort DriveLetter | Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
Get-PhysicalDisk | Select FriendlyName,MediaType,Size,SerialNumber,HealthStatus,OperationalStatus |
Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
# SSD wear stats (if supported)
Get-PhysicalDisk | ForEach-Object {
$r = Get-StorageReliabilityCounter -PhysicalDisk $_ -ErrorAction SilentlyContinue
if ($r) { [PSCustomObject]@{Disk=$_.FriendlyName; Wear=$r.Wear; ReadErrors=$r.ReadErrorsTotal; WriteErrors=$r.WriteErrorsTotal} }
} | Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Network ---" | Tee-Object -FilePath $log -Append
Get-NetAdapter | Select Name, Status, LinkSpeed, MacAddress | Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
Get-NetIPAddress | Where-Object {$_.AddressState -eq 'Preferred' -and $_.IPAddress -notlike 'fe80*'} |
Select InterfaceAlias,IPAddress,PrefixLength | Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Battery ---" | Tee-Object -FilePath $log -Append
powercfg /batteryreport /output "$dir\battery-$ts.html" | Out-Null
"Battery report: $dir\battery-$ts.html" | Tee-Object -FilePath $log -Append
"--- Temps (best-effort) ---" | Tee-Object -FilePath $log -Append
# This ACPI sensor often exists but may be unreliable on some Lenovos:
Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace root/wmi -ErrorAction SilentlyContinue |
Select @{n='TempC';e={([double]$_.CurrentTemperature-2732)/10}} |
Format-Table -Auto | Out-String | Tee-Object -FilePath $log -Append
"--- Recent critical errors (last 24h) ---" | Tee-Object -FilePath $log -Append
$since=(Get-Date).AddDays(-1)
Get-WinEvent -FilterHashtable @{LogName='System','Application'; Level=1; StartTime=$since} -ErrorAction SilentlyContinue |
Select TimeCreated, ProviderName, Id, LevelDisplayName, Message |
Sort TimeCreated -Descending | Select -First 20 |
Format-List | Out-String | Tee-Object -FilePath $log -Append
"`nReport saved to: $log" | Tee-Object -FilePath $log -Append
Write-Host "Done. See $log and battery HTML in $dir"
How to use
- Run it once a week as Fred (admin PowerShell).
-
It drops:
-
C:\FredChecks\fred-YYYYMMDD-HHMM.txt(all the summaries) -
C:\FredChecks\battery-YYYYMMDD-HHMM.html(full battery report)
-
Notes
- Temps/fan: Windows doesn’t always expose fan RPM. If the temps line shows nothing or looks odd, that’s normal; you can spot-check with Open Hardware Monitor/HWMonitor when needed.
-
SSD wear:
Get-StorageReliabilityCounteronly returns data if the drive/driver supports it. If empty, no problem. - Disk timeouts: keep “Turn off hard disk (plugged in) = 0 (Never)”.