A person types on a laptop displaying a terminal window and system performance dashboards.
Windows often misbehaves without warning. Before you pay a technician, it's worth asking the operating system what it knows. MakeUseOf's Yadullah Abidi has published a five-part checklist of built-in PowerShell and command-line tools. They cover storage reliability counters, battery capacity, Modern Standby drain, unexpected restarts, and system-file corruption. None of them is a magic diagnosis. Together they turn "my PC is acting weird" into evidence you can act on, or hand to a professional.

Run these in an elevated terminal (right-click Start, then choose Terminal or PowerShell as administrator). Most only query or generate reports. DISM /RestoreHealth and sfc /scannow are the exceptions, because they try to repair things.

A person types on a laptop displaying a terminal window and system performance dashboards. 1. Storage: freezes, stalls and unreadable files​

If file transfers hang or folders take forever to open, start with the drive. Run these two commands:

Code:
Get-PhysicalDisk | Select-Object DeviceId, FriendlyName, HealthStatus
Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceId, Temperature, Wear, PowerOnHours, ReadErrorsUncorrected, WriteErrorsUncorrected

Match the DeviceId between the two outputs so you know which drive each number belongs to.

What the tools are. Microsoft's documentation says Get-PhysicalDisk lists physical disks visible through available Storage Management Providers. The reliability counters include device temperature, errors, wear, and time in use. HealthStatus can read Healthy, Warning, Unhealthy or Unknown.

How to read the numbers:

  • Temperature is in Celsius. Compare it with the drive maker's operating specification rather than guessing. The WMI class behind these counters also exposes TemperatureMax, which you can add to the query for context.
  • Wear is a percentage indicator. The WMI class describes it as a storage device wear indicator, in percentage. MakeUseOf says it reflects wear consumed, not life remaining, and that 100 means the estimated wear limit has been reached. Several third-party guides repeat that reading. Check your drive vendor's documentation before treating any specific number as a verdict.
  • ReadErrorsUncorrected and WriteErrorsUncorrected count errors the drive could not fix. Nonzero or rising values deserve attention.

Limits.

  • Blank values are common. Microsoft's own example output shows an empty Wear field. Some drives, controllers and connection paths simply don't report these counters.
  • A blank result does not mean the drive is healthy.
  • A "Healthy" status is the storage provider's opinion, not a guarantee.
  • If wear is near the limit, errors are climbing, or files keep going unreadable, back up first and troubleshoot second.

2. Battery: is it worn out, or are you just using more power?​

powercfg /batteryreport /output "$env:USERPROFILE\battery-report.html"

This writes an HTML report to your user folder. Open it in any browser. Microsoft's powercfg documentation confirms that /batteryreport generates a report of battery usage characteristics over the lifetime of the system, and that /output sets the file path.

Under Installed batteries, compare Full charge capacity with Design capacity:

  • Design capacity is what the battery was built to hold.
  • Full charge capacity is what it holds now.
  • A large gap supports battery wear as a cause of short runtime, even when Windows says "100%."

The report also keeps a capacity history, so you can see a trend rather than judge one reading. The runtime estimates are based on recorded usage. Treat them as context, not a promise. A gap doesn't rule out other causes such as brightness, background apps or radios, but a healthy capacity ratio points you toward usage or software.

3. Modern Standby: the laptop that dies overnight​

Code:
powercfg /a
powercfg /sleepstudy /output "$env:USERPROFILE\sleepstudy.html"

The first command lists available sleep states. If you see Standby (S0 Low Power Idle), your machine uses Modern Standby, and SleepStudy applies. It is not a general sleep diagnostic for older S3-only laptops.

What Microsoft says.

  • SleepStudy has been an inbox component since Windows 8.1 on PCs that use the modern standby power model. That is from the Modern Standby documentation in the packet, not from the search result.
  • The report covers the last three days by default. Use /duration to go longer, up to 28 days. For example: powercfg /sleepstudy /duration 7 /output "$env:USERPROFILE\sleepstudy.html".
  • Microsoft says to be most concerned about long sessions of several hours with sustained high drain. In the report, rows are colour-coded green, orange and red to make these easy to spot.
  • Short sessions are not tracked. Microsoft says sessions under ten minutes are not tracked, and sessions over an hour reflect real use.

Top Offenders. Each session lists its most active components. Microsoft's documented categories include:

  • Fx devices
  • Activators (software that keeps the system awake for background work)
  • Networking
  • Processor
  • PDC phase

Treat these as leads, not proof. A Wi-Fi adapter listed as an offender points to a driver or network-activity investigation. It does not mean the adapter is broken. Microsoft also notes that firmware and OS changes can shift Modern Standby behaviour, so the report's system information section matters.

4. Random restarts: reading Event ID 41​

Code:
Get-WinEvent -FilterHashtable @{
  LogName='System'
  ProviderName='Microsoft-Windows-Kernel-Power'
  Id=41
  StartTime=(Get-Date).AddDays(-14)
} | Select-Object TimeCreated, Id, Message | Format-List

This pulls Kernel-Power Event 41 entries from the last 14 days. What Event 41 means. Microsoft's guidance says Windows logs it the next time the computer starts after an unexpected shutdown. It can come from a power interruption or a Stop error. The event alone may not say what happened. That is only a partial point. The Microsoft page says by itself it might not contain enough information to define what occurred.

What to check:

  • Timestamp. It marks the next boot, not the moment of failure. Use it to find the relevant reboot, then look at nearby System and Application log events.
  • BugcheckCode. If it is nonzero, you have a blue-screen lead. Microsoft notes the value is stored in decimal, so convert it to hexadecimal with Calculator. For example, 159 becomes 0x0000009f.
  • PowerButtonTimestamp. If it is nonzero, you probably held the power button down.
  • All zeros. This pattern often points to hardware or power, but it is not proof. Microsoft lists suspects: overclocking, memory, power supply capacity, and overheating. It also says to look for Event ID 46 from volmgr ("Crash dump initialization failed"). That would mean a crash may have occurred but the system couldn't write the details, so check the pagefile configuration.

One practical catch: the Message property in the command above won't show every event data field. To see BugcheckCode, open the event in Event Viewer and check the Details tab, or query the event data explicitly. MakeUseOf mentions that Windows may log a warning about critical temperatures. Microsoft's Event 41 page doesn't establish that, so don't rely on a missing warning to rule out heat.

5. Windows itself: DISM, then SFC​

Code:
DISM.exe /Online /Cleanup-Image /ScanHealth
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow

The order matters:

  1. ScanHealth checks the component store for corruption without repairing it. /Online targets the running installation.
  2. RestoreHealth attempts the repair, and only needs running if corruption is found.
  3. sfc /scannow then checks protected system files and repairs as it scans.

Where DISM gets its files. Microsoft's Windows Update troubleshooting guidance says DISM repair works best when it can reach Microsoft's servers. If the PC can't connect, you can point DISM at a working installation of the same OS version, or at files on a network share, USB or DVD. The documented form is DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:<path> /LimitAccess.

What success looks like. Microsoft's page says DISM should report that the restore operation completed successfully before you move on. Let SFC reach 100%. Its closing message tells you which of these happened:

  • No integrity violations were found.
  • Corruption was found and repaired.
  • Corruption was found that could not be fixed.

DISM logs to %windir%\Logs\CBS\CBS.log, which is where to look if repairs fail.

What a clean result means. A clean scan rules out one class of problem. It does not explain every freeze.

What to bring to a technician​

  • Save the battery and SleepStudy HTML files.
  • Copy the SSD counter output.
  • Note the Event 41 times and any bug check codes.
  • Record the DISM and SFC results.
  • Write down when each symptom happens.
  • Back up important files first.

The honest caveat​

These checks are queries and reports, not a verdict. Storage counters depend on the drive and driver exposing them. SleepStudy only applies to Modern Standby machines. Event 41 records that something went wrong, not what. MakeUseOf itself frames the output as a starting point. It's also worth noting the article suggests running the DISM and SFC checks periodically as maintenance. Microsoft's documentation frames them as repair tools for when problems appear, so use them as troubleshooting steps rather than a weekly ritual.

What you get is a better-informed conversation with whoever fixes your PC, and sometimes you'll find the answer yourself.

 

References

  1. These PowerShell commands tell you what’s wrong with your PC before you pay anyone to fix it MakeUseOf 2026-11-16T21:30:16+00:00
  2. Powercfg command-line options | Microsoft Learn learn.microsoft.com
  3. Get-PhysicalDisk (Storage) | Microsoft Learn learn.microsoft.com