SSD Drive Detection

Hello Experts,

I need to identify SSD drive in our environment. Is there any property in BigFix console? if no please help with the relevant relevance.

Thanks in advance :slight_smile:

We just did something similar. Luckily the “Disk Drives - Windows…” analysis will often-times return a SSD inside of the list. We were looking for Self-Encrypting Drives so we searched for SED or FDE.

That got us about 80%. Then we did spot checks on systems and added the unique ID’s for the drives in. That got us the 0ther 19%.

There may be a way to determine if it is SSD or not through relevance, but I haven’t tried as this way was pretty fast.

1 Like

There are a few ways to do this. What OSes do you need to do this with?

Generally, you will need to use a combination of SMBIOS, WMI, and IOReg to do this for the various OSes, but there are also some built in inspectors for disk drives.

Related:

Hello Thanks for reply …

We are using Win 7. I just want to get information abut my disk (HDD or SSD). I tried those URL’s relevance which you sent (its very useful) but did not get expected results.

please assist.

Thasnks

Hi Thanks for your reply…

If you have any idea Please Assist …

Those analyses I linked may not give the exact info you are looking for, but they are good examples of how to get to the info you are looking for. They do provide a lot of info about the hard drives that when looked over can give you a good idea of what you have.

Since you have Windows clients, then you are going to want to use a combination of native relevance inspectors, SMBIOS inspectors, and WMI inspectors. The other option is to find something you can run on the command line that will give you the answer, then pull back the result into BigFix. You can also read files and registry entries to give you an idea.

Do you know what kinds of SSDs you generally have?

Do you care about SSD vs HDD for performance reasons? or another reason? You can tell with a reasonable margin if you have an SSD in a particular system based upon the Windows Experience Index detailed results, which includes a drive benchmark. Which computers have SSDs in this benchmark is usually pretty obvious.

See here: https://bigfix.me/analysis/details/2994570


Also look at the results of this query:

selects "* FROM Win32_DiskDrive" of wmis

This won’t work in all cases, but it does work for my particular system:

exists (it as lowercase) whose(it contains "ssd") of string values of selects "* FROM Win32_DiskDrive" of wmis

You could also use this to look for particular models or manufacturers that indicate an SSD is present.


This has performance info:

selects "* FROM Win32_PerfRawData_PerfDisk_PhysicalDisk" of wmis

Has some useful info:

selects "* FROM MSFT_Disk" of wmis "ROOT\Microsoft\Windows\Storage"

This provides media type, rotation speed, and other useful items:

selects "* FROM MSFT_PhysicalDisk" of wmis "ROOT\Microsoft\Windows\Storage"
  • BusType of 12,13 or 17 indicates a solid state device but not in all cases
  • MediaType of 4 indicates solid state device
  • SpindleSpeed that is less than or equal to 1 indicates SSD

See here: https://msdn.microsoft.com/en-us/library/windows/desktop/hh830532(v=vs.85).aspx


Related:

Thank you very much for your help and advise.

To boost SOE performance we are planning to enable TRIM in our environment. Before enabling the TRIM we need to identify how many drives are SSD and HDD.

1 Like

Enabling TRIM on HDDs should not cause harm in almost all cases. If TRIM isn’t supported at all, then it should be ignored. Also, typically enabling TRIM only tells the OS that it can/should send TRIM commands, but it doesn’t mean that it then will do so for all volumes.

Enabling TRIM on a very few models of old SSDs will actually cause problems because they did a poor job implementing TRIM. I would be surprised if you run into this as it should be very rare at this point, but it is possible. Though you may never run into the issue if the OS knows about it, or only sends non-queued TRIM commands to drives that have issues with queued versions. You might want to make sure you update SSD firmware in general. See here: https://en.wikipedia.org/wiki/Trim_(computing)#Shortcomings

You should be able to enable TRIM everywhere, though testing this with each model is a good idea, though to really be safe, you’d have to test every model and every version of firmware for that model you have in production. (updating the firmware makes this easier, since then you only have to validate the newest firmware)

Many of the analyses I provided will give you the SSD/HDD model, which will help you figure out how diverse the population of drives is and help you choose the most common ones to validate.

Again thanks for your valuable words,

Yes we can enable the TRIM on every machine there in no harm. but my client is asking for SSD drive and HDD drive report .

I am trying to create a similar report. I have not found any information on how to determine if the drive is a SSD or not. Were you able to produce your report? I am not able to place TRIM on the network for my report. Doesn’t seem that this was solved. Can we continue the thread on identification of a SSD?

Another thing to keep in mind is that a script that might work in Windows 7 will not work in Windows 10. Trying to find a query that will work on both platforms.

I did give ways of finding this info above for windows.

Here is 2 different ways to get “number of ssds” in a Windows system:

Q: number of integer values whose(it = 4) of selects "MediaType FROM MSFT_PhysicalDisk" of wmis "ROOT\Microsoft\Windows\Storage"
A: 2
T: 20.473 ms

Q: number of integer values whose(it <= 1) of selects "SpindleSpeed FROM MSFT_PhysicalDisk" of wmis "ROOT\Microsoft\Windows\Storage"
A: 2
T: 20.164 ms

You really need to examine the results of the raw WMI values and SMBIOS values across your fleet to get a good idea of what values are expected and validate them. (the results of both of the above should generally match, but that is not a certainty)

In general, I would approach this by figuring out what is the best way to determine if an SSD is present in general, using the Windows Registry, WMI, Filesystem, CommandLine, etc… (in other words, research this generically that has nothing to do with BigFix) but then when you figure out the best ways to find the answer, then the question becomes how do I write relevance to find that same answer.