Bad media type in get-physicaldrive


With the get-physicaldisk command, my disk appears as “unspecified” in MediaType except that it should appear as hdd.

Is there another command to give me the correct information?

thanks in advance

Welcome to the forum. :wave:t4:

I think because this information is actually provided by the drive itself to the OS it may be the same result with other ways to query your drive. You may try this:

Get-CimInstance -ClassName MSFT_Physicaldisk -Namespace root\Microsoft\Windows\Storage

The output differs depending on the PowerShell version you run this command on. On version 7 it human friendlier. On version 5.1 you have to look for the MediaType number. 3 stands for HDD and 4 stands for SSD.

Thank you for your reply,

I am in version 5 of the PS and your order gives the value “0” for the mediatype.

Sorry for the writing but I am French and have my messages translated by google

That’s what I meant. The problem could be with your hdd - not with PowerShell or Windows.

If I run the windows “task manager”
and that I activate the “Performances” menu
Beside the disc, I can see “HDD”

It will be hard to troubleshoot such specific issue in a forum. The problem could be with your WMI subsystem.

Is it only one system or do you have this problem on many computers?

On a single Dell PC with a SAMSUNG HM121HI drive

In an enterprise environment I’d recommend to re-install Windows. That’s probably faster than troubleshooting this weird behaviour for hours and hours.

I just reinstalled Windows 10 21H1

I changed the drive and the problem is the same.
The error comes from the PC.
I modified the mediatype by the command Set-PhysicalDisk

Great that you’ve found a solution and thanks for sharing. :+1:t4: :slightly_smiling_face: