# WMI Query for SSD?



## tycoonbob

From my previous research and testing, nothing in WMI shows if a drive is SSD or HDD. You can find the interface type, but that doesn't help.

For example, if I run:
wmic diskdrive list brief (Powershell or CMD)

It returns this:

Code:



Code:


Caption                                DeviceID            Model                                  Partitions  Size

AMD 2+0 Stripe/RAID0 SCSI Disk Device  \\.\PHYSICALDRIVE0  AMD 2+0 Stripe/RAID0 SCSI Disk Device  2           117999866880

(I have 2 60GB Mushkin Enhanced Chronos Deluxe in Raid0)

AMD because it's using the AMD onboard controller, 2+0 because it's 2 drives with 0 spares, stripe/Raid0...because it's Raid0. Why it shows up SCSI, I do not know. I'd assume it has something to do with my Raid. Lastly, there is nothing directly tying it to my boot drive (you would have to do some post query processing to get this info).

For example, if I run:
wmic diskdrive list full

It returns:

Code:



Code:


Availability=
BytesPerSector=512
Capabilities={3,4}
CapabilityDescriptions={"Random Access","Supports Writing"}
CompressionMethod=
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
DefaultBlockSize=
Description=Disk drive
DeviceID=\\.\PHYSICALDRIVE0
ErrorCleared=
ErrorDescription=
ErrorMethodology=
Index=0
InstallDate=
InterfaceType=SCSI
LastErrorCode=
Manufacturer=(Standard disk drives)
MaxBlockSize=
MaxMediaSize=
MediaLoaded=TRUE
MediaType=Fixed hard disk media
MinBlockSize=
Model=AMD 2+0 Stripe/RAID0 SCSI Disk Device
Name=\\.\PHYSICALDRIVE0
NeedsCleaning=
NumberOfMediaSupported=
Partitions=2
PNPDeviceID=SCSI\DISK&VEN_AMD&PROD_2+0_STRIPE/RAID0\4&AEB806D&0&000000
PowerManagementCapabilities=
PowerManagementSupported=
SCSIBus=0
SCSILogicalUnit=0
SCSIPort=4
SCSITargetId=0
SectorsPerTrack=63
Signature=3737494951
Size=117999866880
Status=OK
StatusInfo=
SystemName=DEREKDESKTOP
TotalCylinders=14346
TotalHeads=255
TotalSectors=230468490
TotalTracks=3658230
TracksPerCylinder=255

The full command shows the PNP dev_ and ven_ IDs, but where I am in raid it doesn't list it that way. Also, disappointing, is that it doesn't list my individual drives...just my array.

Play around with this, in case you haven't used a WMI GUI before:
http://thepowershellguy.com/blogs/posh/archive/2007/03/22/powershell-wmi-explorer-part-1.aspx

A great tool. NameSpace you want is ROOT\CIMV2, and class should be Win32_DiskDrive.

Lastly, I am a SCCM (SMS or ConfigMgr, whichever you have heard before) guy...so let me check around in reporting with my home environment, and see if it can do anything better.


----------



## Manyak

Yeah I didn't know of and couldn't find anything either....I thought maybe there was something I missed. I mean, Windows does some testing to detect an SSD to know if it should run defrag, right? Is there a query for that info? Or maybe a registry key?

I was about to resort to using the Model since there's only one type of SSD used in this company, but it would be nice to have something generic that I don't have to worry about.

Thanks for the GUI too, never tried one before.


----------



## subassy

I haven't done any research on WMI querying for an SSD but I did get really in WMI queries for a few months there and I was just thinking about it...maybe there's an indirect way to tell something like that...?

Like perhaps all SSDs score higher on the WEI than any mechanical or...maybe there's a writes/second or related stat stored some place...I'm really thinking about getting an SSD


----------

