WMIC diskdrive replacement: look up hard disk information with PowerShell

To look up hard disk information in PowerShell, run Get-CimInstance Win32_DiskDrive | Select-Object Name,Model,SerialNumber,Size,Status for model, serial number and size, or Get-PhysicalDisk for health status and media type. The old wmic diskdrive command no longer works on current Windows 11, because Microsoft has removed WMIC.
Below are the commands that replace WMIC, what each one returns, and how to read the drive type codes.
How do you look up hard disk information with PowerShell?
Open Start, type PowerShell and select the result. The CIM commands below usually run without elevation, while Get-PhysicalDisk may need an elevated console on some systems, so reopen PowerShell as administrator if it returns nothing. Disks matter because they hold the operating system and your data. They do not last forever, and a failing drive can lead to data loss if no backup exists, so a quick status check is worthwhile. You can also use Disk Management or programs such as Hard Disk Validator, Disk Checkup or DiskBoss.
Option 1: Retrieve general information about each drive
Get-CimInstance Win32_LogicalDisk returns the drive letter, drive type, total size and free space in bytes, and the volume name for each connected drive.

The command: Get-CimInstance -ClassName Win32_LogicalDisk
The original version of this guide used Get-WmiObject -Class Win32_LogicalDisk, which still works in Windows PowerShell 5.1. Microsoft recommends the CIM cmdlets instead. Drive type is a number:
- 0 -- Unknown
- 1 -- No Root directory
- 2 -- Removable Disk
- 3 -- Local Disk
- 4 -- Network Drive
- 5 -- Compact Disc
- 6 -- Ram Disk
Add a filter to show one type only, for example Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=4" for network drives.
Option 2: Retrieve hard drive properties (the WMIC replacement)
Get-CimInstance Win32_DiskDrive is the direct replacement for wmic diskdrive get. Microsoft removed WMIC from all supported Windows 11 versions during 2026 (disabled by default from 23H2 and 24H2, removed on upgrade to 25H2), and recommends PowerShell instead. WMI itself is not being removed.

The screenshot shows the old WMIC output. The PowerShell equivalent is:
Get-CimInstance Win32_DiskDrive | Select-Object Name,Model,SerialNumber,Size,Status
This returns the device name, model, serial number, size in bytes and status. Other properties you can add include InstallDate, InterfaceType, FirmwareRevision, DefaultBlockSize, CompressionMethod, Capabilities, Availability, LastErrorCode or PowerManagementCapabilities. Add, replace or remove names after Select-Object to build your own list. To see every property, pipe the output to Format-List *.
Option 3: Check drive health with Get-PhysicalDisk
Get-PhysicalDisk lists each physical disk with its FriendlyName, OperationalStatus, HealthStatus and Size, and accepts -HealthStatus with the values Healthy, Warning, Unhealthy or Unknown. To add media type and serial number, run:
Get-PhysicalDisk | Select-Object FriendlyName,MediaType,HealthStatus,OperationalStatus,Size,SerialNumber
Use it for a fast status check across all drives. A Warning or Unhealthy result means you should back up your data first.
Closing Words
These commands are useful in scripts and for quickly checking status, serial numbers, error codes and capabilities. Prefer a graphical tool? Crystal DiskInfo shows SMART data in a window.
Related: check hard drive health with HD Tune, fix Optimize Drives problems
This also doesn’t deal with Individual physical disks which make up a Raid Array albeit the subject suggests it does.
A full powershel version :
Get-PhysicalDisk | select Model, FriendlyName, SerialNumber, Size, BusType, MediaType, OperationalStatus|Format-Table
Any command that calls WMIC isn’t really ‘using PowerShell’ as WMIC is an independent binary that can be used from CMD or any other command processor, and the output is simple text cannot be manipulated in PowerShell without first parsing it into objects.
As an earlier commenter mentioned, Get-PhysicalDisk, along with Get-Disk, are native PowerShell commands that do the heavy lifting for you and return their data in actual PowerShell objects.
Get storage disk volume size:
WMIC LogicalDisk Where DriveType=3 Get DeviceID, VolumeName, Size, FreeSpace /Format:Value
Get current processor usage:
WMIC CPU Get Name, LoadPercentage /Format:Value
Get memory size and usage:
WMIC ComputerSystem Get TotalPhysicalMemory /Format:Value
WMIC OS Get FreePhysicalMemory /Format:Value
One should be warned however that WMI may sometimes report wrong serial numbers for disk drives, as some people reported here : https://social.technet.microsoft.com/Forums/scriptcenter/en-US/0333dd28-3207-4df8-85c3-7ff540f98464/wmi-disk-serial-number?forum=ITCG
That’s not really “the Windows Powershell” (just a nod to remove the “the” at the start of the article) – it’s just calling WMI directly which you can do from a plain CMD prompt.
What you really want to be doing is using this:
Get-PhysicalDisk | FL
Much easier to deal with within a PS script.