Determine if drive is SSD or hybrid
If anybody knows a way of determining this, either through K1000 or a script, I'd appreciate the help. Thanks!
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
flip1001
9 years ago
See if this script taken from custom-inventory-rule-escaping-quotes can be modified to detect hybrid drives.
I don't have any hybrid drives to test, but the script does differentiate SSDs from HDDs.
I don't have any hybrid drives to test, but the script does differentiate SSDs from HDDs.
$diskdrive = gwmi win32_diskdrive
foreach ($drive in $diskdrive){
if ($drive.model -match 'SSD'){
$ssd='SSD'
} else {
$ssd='HDD'
}
$partitions = gwmi -Query "ASSOCIATORS OF {Win32_DiskDrive.DeviceID=`"$($drive.DeviceID.replace('\','\\'))`"} WHERE AssocClass=Win32_DiskDriveToDiskPartition"
foreach ($part in $partitions){
$vols = gwmi -Query "ASSOCIATORS OF {Win32_DiskPartition.DeviceID=`"$($part.DeviceID)`"} WHERE AssocClass = Win32_LogicalDiskToPartition"
foreach ($vol in $vols){
out-host -InputObject "$ssd $($vol.name)"
}
}
}
Posted by:
SMal.tmcc
9 years ago