Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Checking Hard Drive Health (SMART) in Windows

November 12, 2021 PowerShellWindows 10Windows Server 2019

Checking Hard Drive Health (SMART) in Windows

Current Windows versions collect information about the health of hard drives in your computer via SMART and may notify a user in case of any problems. Let’s see what a Windows notification of physical problems with a hard drive looks like and how to get SMART information about the health of your disks using built-in tools (WMI classes, PowerShell and command prompt).

Most modern hard drives (including HDD, SSD, NVMe SSD) support S.M.A.R.T (Self-Monitoring, Analysis, and Reporting Technology). A disk controller estimates the physical characteristics of a disk, and Windows can access these data through WMI.

Contents:
  • Windows Detected a Hard Disk Problem
  • Check SMART Attributes of a Hard Disk via WMI Class and PowerShell

SMART information is available for local physical disks only (ATA/SATA devices). External LUNs connected via Fiber Channel, iSCSI, RAID, or shared drives don’t report SMART status.

Windows Detected a Hard Disk Problem

By default, disk monitoring by the Logical Disk Manager and Diagnostic Policy Service is enabled in Windows. If one of the drives returns the Predictive Failure status, the Task Scheduler runs the Microsoft-Windows-DiskDiagnosticResolver (\Microsoft\Windows\DiskDiagnostic) task that displays the error message:

Windows detected a hard disk problem
Back up your files immediately to prevent information loss, and then contact the computer manufacturer to determine if you need to repair the disk.

drive health error: Windows Detected a Hard Disk Problem

The following messages appear in the Event Viewer logs:

The driver has detected that device \Device\Harddisk1\DR1 has predicted that it will fail. Immediately back up your data and replace your hard disk drive. A failure may be imminent.
Windows Disk Diagnostic detected a S.M.A.R.T. fault on disk .......... (volumes E:\). This disk might fail; back up your computer now. All data on the hard disk, including files, documents, pictures, programs, and settings might be lost if your hard disk fails. To determine if the hard disk needs to be repaired or replaced, contact the manufacturer of your computer. If you can't back up (for example, you have no CDs or other backup media), you should shut down your computer and restart when you have backup media available. In the meantime, do not save any critical files to this disk.

The Predictive Failure status means that one of the disk characteristics (like mechanical wear) doesn’t match the reference values and it may fail.

In this case, it is recommended to back up data from the disk to a separate media. Then check the disk using a default manufacturer SMART tool (or other tools, like CrystalDiskInfo) and using chkdsk.

You can show or hide this message using a separate GPO option, Disk Diagnostic: Configure execution level, located in the Administrative Templates -> System -> Troubleshooting and Diagnostics -> Disk Diagnostics section of GPO.

Enable drive SMART health alerts on Windows using GPO - Disk Diagnostic: Configure execution level

Most often, third-party tools (like CrystalDiskInfo, HDTune, etc.) are used to get information about disk health in Windows. These programs provide a lot of information about your disks.

CrystalDiskInfo drive health report

For example, I can get an SSD resource. The current value of the Total Host Writes is 507 GB. The manufacturer guarantees that the maximum write resource (TBW) for my SSD model is 300 TB. So the disk wear is less than 0.2%. The disk is only used for 108 hours.

Check SMART Attributes of a Hard Disk via WMI Class and PowerShell

You can check SMART disk data using Windows built-in tools. You can view the information about the disk health of your computer through the Control Panel (Control Panel\System and Security\Security and Maintenance). The section also contains information about the state of the Windows Error Reporting service.

In my case, the disks are OK, since there is the following message in the Drive Status section: OK, All drives are working properly.

Drive status in Windows Control Panel: All drives are working properly

As we told above, Windows collects SMART information from the disks and allows to access it using WMI.

SMART must be enabled in BIOS/UEFI settings.

Run the elevated command prompt and use the command below to get the state of all your disks:

wmic diskdrive get status

cmd: wmic diskdrive get status

In this case, the disks are OK. Otherwise, you will see Bad, Unknown, or Caution status.

If you see any errors when accessing WMI, try to repair the WMI repository.

You can get information about possible hard drive failure using MSStorageDriver_FailurePredictStatus WMI class:

wmic /namespace:\\root\wmi path MSStorageDriver_FailurePredictStatus

get FailurePredictStatus in windows via WMI

If the disk controller doesn’t detect any disk problems, the PredictFailure value should be FALSE.

The same class may be queried using PowerShell:

Get-WmiObject -namespace root\wmi –class MSStorageDriver_FailurePredictStatus

If the value is PredictFailure = True, pay attention to the error code shown in the Reason parameter. The meaning of the PredictFailure error code depends on your vendor. You can find information on some error codes in the wiki (https://en.wikipedia.org/wiki/S.M.A.R.T.#ATA_S.M.A.R.T._attributes).

You can get the values of some reliability counters using the following PowerShell command:

Get-Disk | foreach { $_ | Get-StorageReliabilityCounter | Format-List }

Get disk reliability counters - PowerShell - Get-StorageReliabilityCounter

You can display information on some SMART attributes only:

Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object -Property DeviceID, Wear, ReadErrorsTotal, ReadErrorsCorrected, WriteErrorsTotal, WriteErrorsUncorrected, Temperature, TemperatureMax | FT

Also, you can view general information about your disks using the Get-PhysicalDisk cmdlet:

$(Get-PhysicalDisk | Select *)[0]

PhysicalDisk - health status powershell

Earlier we showed how to get information about a failed disk in Windows Server S2D using Get-PhysicalDisk and replace it:

Get-PhysicalDisk | Where-Object {$_.HealthStatus -ne 'Healthy'}

Using these WMI classes and PowerShell cmdlets, you can configure disk health data collection on user computers to proactively track their status. You can create alerts for your monitoring system (like zabbix, nagios, icinga, etc.), SCCM compliance report using Configuration Baseline, PowerShell Desired State Configuration (DSC), query SMART status from remote computers using a PowerShell Remoting (Invoke-Command cmdlet), or use your methods.

0 comment
5
Facebook Twitter Google + Pinterest
previous post
Searching AD Groups, Users, and Computers using Wildcards
next post
IdFix: Preparing On-Prem Active Directory Sync with Azure

Related Reading

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

Enable Internet Explorer (IE) Compatibility Mode in Microsoft...

January 27, 2023

Finding Duplicate E-mail (SMTP) Addresses in Exchange

January 27, 2023

How to Disable or Uninstall Internet Explorer (IE)...

January 26, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023
  • Adding Trusted Root Certificates on Linux

    January 9, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Configuring Port Forwarding in Windows
  • Installing RSAT Administration Tools on Windows 10 and 11
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • How to Hide Installed Programs in Windows 10 and 11?
  • Adding Drivers into VMWare ESXi Installation Image
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top