Monthly Archive

SMART disks

A question on the forum about using WMI to work with SMART disks got my digging into the subject.  SMART disks - – detect and report on disk problems (hopefully) before they cause a catastrophe. While vendors’ implementations vary there are some things we can access.

The WMI classes are in the root\wmi namespace

PS> Get-WmiObject -Namespace root\wmi -List MSStorageDriver_Failure* | select Name



The most immediate concern is – what is the status of our disks

function test-diskstatus {            
param (            
 [string]$computername = $env:COMPUTERNAME            
Get-WmiObject -Namespace root\wmi -Class MSStorageDriver_FailurePredictStatus -ComputerName $computername |            
select InstanceName, Active, PredictFailure, Reason            

The InstanceName is long so the best display is list

PS> test-diskstatus | fl

InstanceName   : IDE\DiskST9250320AS_____________________________HP07____\5&b0fd174&0&1.0.0_0

Active         : True

PredictFailure : False

Reason         : 0


The PredictFailure is the the important property & we worry when it is true!

Leave a Reply