How to Check SSD and HDD Health with PowerShell (Get-PhysicalDisk)

A drive almost never warns you before it dies. One day Windows takes longer to boot, the next you get a read error, and the following week the SSD vanishes from the BIOS. The good news: Windows already stores health data for every disk, and you can read it in seconds with two native PowerShell cmdlets, no extra software needed.
What Get-PhysicalDisk and Get-StorageReliabilityCounter are
Both belong to the Storage module, which ships with Windows 10, Windows 11 and Windows Server. Get-PhysicalDisk lists the physical disks and the overall state of each one. Get-StorageReliabilityCounter goes deeper and, according to the Microsoft documentation, returns reliability counters such as temperature, errors, wear and the device's usage time.
Open PowerShell as administrator. Without elevation, many counters come back empty.
Step 1: overview of your disks
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, HealthStatus, OperationalStatus, @{n='GB';e={[math]::Round($_.Size/1GB)}}The output lists the model, media type (HDD or SSD), bus (SATA, NVMe, USB), capacity in GB and two status fields:
- HealthStatus:
Healthy,WarningorUnhealthy. Anything other thanHealthycalls for an immediate backup. - OperationalStatus:
OKis what you want. Values such asLost CommunicationorPredictive Failurepoint to a real problem.
How can I tell if my SSD or HDD is failing?
Run Get-PhysicalDisk and check HealthStatus: if it isn't Healthy, back up now. Then look at the error and wear counters with Get-StorageReliabilityCounter.
HealthStatus is a coarse indicator: a disk can show Healthy and already have signs of wear. That's why the next step matters.
Step 2: temperature, wear and errors
Get-PhysicalDisk | Get-StorageReliabilityCounter |
Select-Object DeviceId, Temperature, TemperatureMax, Wear, PowerOnHours, ReadErrorsTotal, WriteErrorsTotalWhat each field tells you:
- Temperature / TemperatureMax: current temperature and the recorded peak, in °C. An NVMe SSD running very hot usually means poor airflow or a missing heatsink.
- Wear: SSD wear percentage. The higher it is, the closer the cells are to the end of their life.
- PowerOnHours: total hours the disk has been powered on.
- ReadErrorsTotal / WriteErrorsTotal: accumulated errors. A number that grows between checks is the most reliable sign of trouble.
One catch: not every disk exposes every counter. Microsoft's own documentation example shows the Wear field blank. It depends on firmware, driver and bus — disks in USB enclosures, for instance, often don't pass this data through. An empty field doesn't mean a healthy disk; it means you don't have that information.
Step 3: everything in one table
Get-PhysicalDisk | ForEach-Object {
$r = $_ | Get-StorageReliabilityCounter
[pscustomobject]@{
Disco = $_.FriendlyName
Tipo = $_.MediaType
Saude = $_.HealthStatus
TempC = $r.Temperature
Desgaste = $r.Wear
HorasLigado = $r.PowerOnHours
ErrosLeitura = $r.ReadErrorsTotal
}
} | Format-Table -AutoSizeThis fits on one screen and works as a quick report to show a client or paste into a ticket.
Step 4: keep a history and compare
A single number says little. What gives away a dying disk is the trend. Save the output to CSV with the date:
Get-PhysicalDisk | ForEach-Object {
$r = $_ | Get-StorageReliabilityCounter
[pscustomobject]@{
Data = Get-Date -Format 'yyyy-MM-dd'
Disco = $_.FriendlyName
Saude = $_.HealthStatus
Desgaste = $r.Wear
ErrosLeitura = $r.ReadErrorsTotal
}
} | Export-Csv -Path "C:\Audit\discos.csv" -Append -NoTypeInformation -Encoding UTF8The C:\Audit folder must exist beforehand. To run this every week without remembering, schedule it with schtasks or Task Scheduler — the walkthrough is in the post on scheduling tasks in Windows from the terminal. If the ErrosLeitura column goes up from one CSV to the next, the disk is degrading.
Cross-check with Windows logs
When a disk starts failing, Windows logs I/O error events in the System log. You can pull the most recent ones with Get-WinEvent:
Get-WinEvent -FilterHashtable @{LogName='System'; ProviderName='disk'} -MaxEvents 20 -ErrorAction SilentlyContinue |
Select-Object TimeCreated, Id, MessageRepeated events alongside rising error counters make a strong combination. The post on investigating Windows errors with Get-WinEvent explains how to refine this filter.
What to do if the disk has a problem
- Back up first. Before any further diagnosis, copy what matters. The 3-2-1 backup rule applies here, and Robocopy handles the copy with no extra software.
- Don't stress the disk. Defragmenting or running long scans on an unstable disk can speed up the failure.
- Replace the disk. If
HealthStatusis no longerHealthyor errors keep growing, the rational call is to replace it. Keep the old disk for disposable data only, and wipe it securely if you get rid of it.
Keep the method's limit in mind: these counters come from what the disk and driver report. Tools like smartctl (smartmontools) read raw SMART attributes and show more detail, but for a routine check native PowerShell covers the essentials.
A monitored disk is one you replace calmly, not in a panic. If you don't have an automatic backup running yet, start there: the post on automatic backup with Robocopy takes about ten minutes to set up.




Comments