Beta 42

Research and Development


PowerShell - Finding Disk Controller Errors

This powershell single-liner will analyse your system event log for disk controller errors.

PS> Get-EventLog -LogName System -InstanceId 3221487627 -ea 0 | ForEach-Object { $_.ReplacementStrings[0] } | `
  Group-Object -NoElement | Sort-Object Count -Descending

Count Name
----- ----
        23 \Device\Harddisk2\DR4
        21 \Device\Harddisk2\DR2
         7 \Device\Harddisk2\DR3

Such errors can indicate disk failure but most often they result from USB sticks that you removed unexpectedly. If you do not get any results, then there are no disk controller errors.