Disk Health Check

This script checks the SMART status of all available disks. It’s helpful for spotting potential drive failures.



Get-WmiObject -Namespace "Root\Microsoft\Windows\Storage" -Class MSFT_PhysicalDisk | ForEach-Object {
    Write-Output "Disk: $($_.DeviceId)"
    Write-Output "Status: $($_.OperationalStatus)"
    Write-Output "Health: $($_.HealthStatus)"
    Write-Output "--------------------------------"
}

• Explanation: This script uses WMI to check the health and operational status of each disk. If the HealthStatus is anything other than “Healthy,” it may indicate a potential issue.

Last updated