WMIC is gone: checking drive health from the command line

For years, the quickest drive check on Windows was one line in Command Prompt:

wmic diskdrive get model,status

On a current Windows 11 PC, that line now returns an error saying wmic is not recognized. Nothing is wrong with your PC or your drive. Microsoft removed the tool.

This post covers what replaced it, what the new commands tell you, and when a scripted Crystal Disk Info report is the better answer.

What happened to wmic

WMIC was a command-line front end to Windows Management Instrumentation (WMI). Microsoft retired it in stages, set out in its own timeline:

WhenWhat changed
2016Deprecated in Windows Server 2012
2021Deprecated in Windows 10, version 21H2
2022Became an optional feature in Windows 11, version 22H2, still installed and switched on
2024Switched off by default in Windows 11, versions 23H2 and 24H2
2025Removed during the upgrade to Windows 11, version 25H2, but could be added back
2026Removed from supported Windows 11 versions, with no option to reinstall

The final step arrived in the August 2026 preview update for Windows 11 versions 24H2 and 25H2, and the September 2026 preview update for version 26H1. The optional-feature route to reinstall the tool closed at the same time.

Only the wmic program was removed. WMI itself is still part of Windows, and Microsoft points people to PowerShell for the same jobs. So every old one-liner has a PowerShell equivalent.

The direct replacement

Open PowerShell or Windows Terminal and run:

Get-CimInstance Win32_DiskDrive | Select-Object Model, Status

This asks the same question as the old command and returns the same answer, normally OK for each drive.

That answer was never worth much, though. The Status field is a single pass-or-fail flag. It usually says OK until a drive is in serious trouble, and it shows nothing about sector counts, wear, or temperature. The old command had the same weakness, and the commands below report more.

Better commands that Windows already includes

A health summary for every drive

Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, HealthStatus, OperationalStatus

Microsoft's reference lists four possible HealthStatus values: Healthy, Warning, Unhealthy, and Unknown.

To show only drives that need attention:

Get-PhysicalDisk | Where-Object HealthStatus -ne 'Healthy'

Temperature, errors, wear, and hours

Get-PhysicalDisk | Get-StorageReliabilityCounter | Format-List

According to Microsoft, this command reports a drive's temperature, errors, wear, and time in use. The output includes these fields:

FieldMeaning
Temperature, TemperatureMaxCurrent temperature and the drive's maximum
ReadErrorsTotal, ReadErrorsCorrected, ReadErrorsUncorrectedRead error counts
WriteErrorsTotal, WriteErrorsCorrected, WriteErrorsUncorrectedWrite error counts
WearWear level, on drives that report it
PowerOnHoursTotal running time
StartStopCycleCount, LoadUnloadCycleCountMechanical cycle counts

Three practical notes:

  • Run it as administrator. Without elevation the counters often come back empty.
  • Expect blanks. Microsoft's own example output shows an empty Wear field. Which fields are filled depends on the drive and its driver.
  • It is not the attribute table. You will not find Reallocated Sectors Count or Current Pending Sector Count by name. For those you need a tool that reads S.M.A.R.T. attributes directly.

When you need the full S.M.A.R.T. picture

Crystal Disk Info from the command line

Crystal Disk Info is a graphical program, but its manual documents three command-line switches. The useful one for scripts is /CopyExit: the program starts, writes its full report to a text file, and closes.

DiskInfo64.exe /CopyExit

The report is saved as DiskInfo.txt in the program's own folder. It is the same report as Edit › Copy: every drive with its model, firmware, hours, health status, temperature, and attribute table.

Things to know before scripting it:

  • It needs administrator rights, so run it from an elevated prompt or a scheduled task set to run with highest privileges.
  • Use the portable ZIP for scripts. The file lands beside the program, which is easy to find in a folder you chose. Download options
  • The executable name depends on your system: DiskInfo64.exe for 64-bit Windows, DiskInfo32.exe for 32-bit, and DiskInfoA64.exe for ARM64.
  • Each run overwrites the last report. Copy or rename the file if you want to keep a history.

A short batch file that keeps dated copies. It assumes the program is in C:\Tools\CrystalDiskInfo and that a Reports folder exists inside it:

cd /d C:\Tools\CrystalDiskInfo
DiskInfo64.exe /CopyExit
powershell -NoProfile -Command "Copy-Item DiskInfo.txt ('Reports\DiskInfo_' + (Get-Date -Format yyyy-MM-dd) + '.txt')"

The last line asks PowerShell for the date, so the file name comes out the same whatever your regional date format is.

smartctl

For a tool designed for the command line from the start, use smartctl from the smartmontools package:

smartctl --scan
smartctl -H /dev/sda
smartctl -a /dev/sda

-H gives a one-line verdict. -a prints the attribute table and logs. smartctl can also start self-tests, which Crystal Disk Info cannot. About self-tests

Which one to use

You wantUse
The old one-liner backGet-CimInstance Win32_DiskDrive
A quick health word per drive, nothing to installGet-PhysicalDisk
Temperature and error counters, nothing to installGet-StorageReliabilityCounter
A full, readable report saved to a fileCrystal Disk Info with /CopyExit
Script-friendly output and self-testssmartctl
To look at a drive without scripting anythingCrystal Disk Info's main window. How to read it

Updating an old script

If a batch file or monitoring script still calls wmic, here is the swap for the most common drive lines:

OldNew
wmic diskdrive get statusGet-CimInstance Win32_DiskDrive | Select-Object Status
wmic diskdrive get model,serialnumberGet-CimInstance Win32_DiskDrive | Select-Object Model, SerialNumber
wmic diskdrive get sizeGet-CimInstance Win32_DiskDrive | Select-Object Size
wmic logicaldisk get name,freespaceGet-CimInstance Win32_LogicalDisk | Select-Object DeviceID, FreeSpace

To call any of these from a .bat file, wrap the line:

powershell -NoProfile -Command "Get-CimInstance Win32_DiskDrive | Select-Object Model, Status"

WMIC questions

Why does "wmic is not recognized" appear?

Microsoft removed the tool from Windows 11. Use the PowerShell commands above.

Can I reinstall wmic?

Not on supported Windows 11 versions. It was available as an optional feature for a time, and that option has been withdrawn.

Does this affect Windows 10?

WMIC was deprecated on Windows 10, and the removal described here applies to Windows 11. The PowerShell commands work on both, so switching now saves trouble later.

Is the PowerShell status more accurate than wmic was?

Get-CimInstance Win32_DiskDrive returns the same flag. Get-PhysicalDisk and Get-StorageReliabilityCounter return more.

Can Crystal Disk Info run without opening a window?

With /CopyExit it starts, saves its report, and closes on its own.

Does a Healthy or OK result mean my drive is safe?

It means no warning has been raised. Drives can fail without one, so keep a backup.