0

I am trying to get the hard disk media from Win32_DiskDrive API. However, it returns me all SSD and HDD drives. I want to get only the HDD disks. Is it supported by Win32_DiskDrive API? Below is the query forget all hard disk media.

SELECT * FROM Win32_DiskDrive WHERE MediaType = "Fixed hard disk media"

I've tried the Get-PhysicalDisk in Powershell, with which we can filter HDD drives, but I want it as part of the WQL query. Thanks in advance.

avocadoLambda
  • 1,332
  • 7
  • 16
  • 33
user3615045
  • 193
  • 2
  • 13
  • look for https://stackoverflow.com/questions/23363115/detecting-ssd-in-windows and https://stackoverflow.com/questions/44020793/get-disk-type-in-qt/44021432#44021432 – RbMm Jul 01 '20 at 09:06
  • You can use `MSFT_PhysicalDisk` with WMI. – Strive Sun Jul 02 '20 at 09:00

0 Answers0