Many has been written about detecting SSD’s through WMI query’s and scripts to perform optimization settings for SSD’s when deploying Windows 7/8 to an SSD Disk.
And although there is no unique identifier to really determine if we are dealing with an SSD or traditional hard drive I believe I may have found something that works better then all the other available options.
For example there is the SSD Drive Script which queries for the ‘ random read rate’ and if it appears to be higher then 8Mb/s it will mark your drive as SSD.
Then there is also the WMI Query:
wmic diskdrive get caption which queries for the disk Caption, and sometimes a vendor has written ‘ SSD’ into the Caption. But that is also to random.
Other alternatives are managing and detecting hard drive product names, but then there is always human intervention required to update the list, because hard drives are being renewed all the time.
Because the value of the SSD Drive Script sometimes outputs not the correct value I have found a better and more reliable tool to determine the hard drive type and speed. The integrated Windows Performance Index that is present within Windows 7/8. Because this performance assessment generates a properly random read/write rate which it looks you have to generate it yourself when your disk is idle at the time the ‘SSD Script’ is being run.
To initiate a Windows Performance Index rating we need our machine during deployment or patching to be rated.
We do this by adding a ‘ run command line’ with the following parameters:
Next the Performance Index will rate the system performance and when ready have the hard drive assessed:
Obviously we cant see the rating when executing a task sequence and the Windows shell being locked, but if we would run a normal WinSAT benchmark this would be the result. And I have noticed that the values of a benchmarked traditional hard drive will not exceed 6.9 while SSD’s exceed 7.0 and more.
No we have something that we can use as a condition to either run or do not run SSD optimalization tasks in a SCCM / MDT task sequence, by using the following condition on a group of optimalization actions:
Because the machine’s hardware has been assessed a performance number has been assigned to the disk. If the disk is not rated the value always responds with zero. In this case we query if the hard drive performance rating is greater then 6.9, if this is the case we execute our SSD optimalization, if it is smaller we skip these steps.
*Alternatively, you can use the same query to execute the WinSAT benchmark for your system if it is allready rated, if it is rated it will skip the benchmark and if a machine is not rated, the benchmark will be executed.
Hope this may help you in your quest to detect and find a reliable condition from which the detection of SSD’s can be queried, and I hope that in the near feature other solutions may be handed to us.
This is a great way to detect if your system has an SSD, but sadly will only work on systems with a single hard drive. The Win32_WinSAT class doesn’t have different instances per-drive so you can only tell IF your system has an SSD, not WHICH DRIVE is an SSD.
I haven’t tested this on a system where the SSD is the non-OS Drive, but I would assume this is only reading disk performance of the OS Drive and not any secondary connected drives.
Hi Dustin, thanks for your comment, indeed this is focussed on a single disk. Mainly because in large enterprise environments the number of workstations equipped with more then one disk is very rare. Nevertheless I hope you have found my post usefull 🙂
then the question; what would you change on a system with SSD’s? What optimizations are you talking about?
Hi Roland, thanks for your comment. It can be debated if you want to tweak Windows when using an SSD, most certainly when Windows has his own detect mechanism to identiy if an SSD is present, and if it is present actions are taken by Windows itself, just to be sure we have made some settings that are to be changed when an SSD is detected, for example: defragmentation, superfetch service, prefetcher and disk indexing settings.
Where do you put this in the Task Sequence? If I try to run this in WinPE 5 it says winsat.exe is not recognized
Hi Cory, this should run post OS. Winsat is a Windows\System32 application.
Thanks for sharing this article.
We run SCCM 2012 SP2 and it simply seems not to work anymore.
What ever I conigure the Task Sequence, I get an error 1 and the TS fails.
In the C:\Windows\Performance\WinSAT\winsat.log I see, that there mus be a problem with the D3D Device.
Any suggestions about this?
Thanks a lot in advance!
Sorry, it should be SCCM 2012 R2, not SP2.
If the vendor of your SSD uses the word “SSD” in any way (friendly name, or otherwise) you can use this powershell command line to identify if the disk is an SSD or not:
PS C:\> get-disk | ? model -match ‘ssd’
See http://blogs.technet.com/b/heyscriptingguy/archive/2013/03/17/powertip-use-powershell-to-identify-ssd.aspx for more information.
Hope this helps!
I’m using schtasks as workaround on SCCM CB
schtasks /create /sc once /ru “SYSTEM” /tr “winsat.exe diskformal” /tn Winsat /st 14:00 (change the time, obviously)
then schtasks /delete /tn Winsat after you’re done
I found this helpful for disabling the Windows Search Index (Backoff) feature in the registry, cant think of much else that would need to be set.