The Windows Management Instrumentation Command-Line Utility (WMIC) is a simple tool that allows users to manage their Windows operating system.
It runs through the Command Prompt and can access information from Self-Monitoring, Analysis and Reporting Technology (SMART), a monitoring system that determines whether your hard drive or solid-state drive (SSD) is functioning as expected.
If you’re noticing slow performance, corrupt files, or other symptoms of media failure, you can quickly use WMIC to determine whether your system is anticipating a media failure. Here are two ways to get that information.
Datarecovery.com provides risk-free media evaluations for SSDs and HDDs, and our no data, no charge guarantee gives you peace of mind as your case progresses. Call 1-800-237-4200 or set up a case online.
Using WMIC to Get Basic HDD/SDD Health Status
The simplest way to use WMIC is to follow these steps:
- Select the Windows button on your taskbar.
- In the search filed, type CMD and hit enter (or select the Command Prompt app).
- Type WMIC and hit enter.
- Type or paste diskdrive get status and hit enter.
This will generate feedback that reads “OK” (which means your drive is working as expected) or “Pred Fail” (which predicts a failure). The below screenshot shows output of the WMIC tool.
While this tells you if your drives are failing, it doesn’t provide much additional info. That may not be necessary; if the drive is on its way out, it’s time to replace it. However, if you want to get more info, you simply need to run WMIC as an administrator and use a different set of commands.
Running WMIC as an Administrator
By running WMIC as an administrator, you can get more information about a potential failure. Follow these steps:
- Select Start and search for the Command Prompt.
- Right-click the Command Prompt and select Run as Administrator.
- Type or paste the following command: wmic /namespace:\\root\wmi path MSStorageDriver_FailurePredictStatus
The program will output a PredictFailure value, along with a Reason code. If the drive is working normally, the PredictFailure will read “False.” By running WMIC in administrator mode, you can get more information about media failures predicted by SMART.
If the PredictFailure value is “True,” SMART predicts — you guessed it — a media failure. The Reason value will provide more information, but regardless of the value, you should back up any important files as soon as possible, then replace the drive.
SMART Failure “Reason” Codes
SMART error codes are not standardized — they’re specific to the drive and the manufacturer — so you’ll need to consult your drive’s documentation to figure out why it’s failing. With that said, these error codes are generally consistent from drive to drive:
- 01 – A high (or unexpected) read error rate.
- 02 – Decreasing throughput performance.
- 03 – Low spin-up time.
- 05 – A high count of reallocated sectors.
- 10 – A high count of spin-start attempts (specific to hard drives).
This isn’t a comprehensive list. Wikipedia’s SMART page contains an updated list of SMART codes, though again, those codes are not universal. If your hard drive has a manufacturer-specific health monitoring utility, you can use that utility to get more information.
Can you fix a hard drive or SSD with a SMART error?
In some cases, yes, but you should back up the device before taking any other action.
For hard drives with soft (non-physical) errors, defragmenting the drive may give the drive an accurate list of bad and healthy sectors. Here’s a guide from Microsoft for defragmenting a hard drive.
But if you don’t know why the error occurred, you shouldn’t take this step (especially if you haven’t backed up your data). Defragmenting can exacerbate physical issues such read/write head failures and spindle failures.
If the drive is failing physically, defragmenting it could cause the drive to mark healthy sectors as bad, which can greatly complicate the data recovery process.
If your drive has important data, the safest course of action is to contact a professional data recovery provider. Even if the drive has not failed physically, a data recovery engineer can recover files without risking damage, and you won’t pay much for the attempt.
That’s one of the major reasons that we offer risk-free media evaluations: If a hard drive or SSD arrives in a working condition, we charge a minimal fee for the transfer. We want to encourage people to take a cautious approach — and to avoid tactics that could endanger their data.
To get started, set up a risk-free evaluation online or contact us at 1-800-237-4200.