Ever wondered how healthy your storage disks are and would like to know if you need to proactively replace the dying one before it’s too late? Well, here is a quick way to find out. And yes, it will be again done in PowerShell.
Generally, the cmdlet Get-PhysicalDisk returns a healthy status for all installed disks.
But the real power comes from Get-StorageReliabilityCounter, the cmdlet that gets the reliability counters for the specified disk, including the device temperature, errors, wear and length of time the device has been in use. Depending on the actual type of disks, not all the information will be available though.
To start, you need to run the cmdlet in an elevated PowerShell console. Pipe through the result of Get-PhysicalDisk to Get-StorageReliabilityCounter, you get a more detailed picture of how your disks perform.
Get-PhysicalDisk | Get-StorageReliabilityCounter
If you’d like to see the entire reliability data of a specific disk,
Get-PhysicalDisk -FriendlyName 'DiskName' | Get-StorageReliabilityCounter | Select *
Since it’s an SSD disk, the two numbers we should pay attention to here are ReadErrorsTotal and Wear. It’s a warning sign if you see any numbers other than 0 appearing in ReadErrors columns. Time to replace it if that happens.
For HDDs, you will also need to pay a bit of attention to their temperatures as well.
Obviously, if you really like to put it in a real use, you might want to make a script and schedule it to run at startup to automate the process. You can even set it up so it only notifies you when it detects something alarming.