Smart group for computers with SSD drives?

mccallister
Contributor

I want to create a smart group for computers that have SSD drives. I've looked at advanced criteria, but I have not been able to find an applicable entry to select.

Does anyone have a solution for this?

5 REPLIES 5

mm2270
Legendary Contributor III

Think you'll need to create an Extension Attribute to capture this, and then use that data for the Smart Group.

A few possibilities to work off of

diskutil info / | grep "Device / Media Name:" | grep -o SSD
system_profiler SPStorageDataType -xml | awk -F'>|<' '/medium_type/{getline; print $3; exit}'

I'd also do some searches here for any existing more well thought out EAs, as I have a feeling someone already tackled this in an Extension Attribute, and no sense in reinventing the wheel if so.

tak10
Contributor II

You can use extension attributes.

You can set input type as a Script.
See the administrator document for more detail. http://docs.jamf.com/10.3.0/jamf-pro/administrator-guide/Computer_Extension_Attributes.html

#!/bin/sh

echo "<result>$(system_profiler SPStorageDataType | grep "Medium Type" | awk '{print $3}')</result>"

bumbletech
Contributor III

I use the script mentioned here to populate an extension attribute: https://www.jamf.com/jamf-nation/discussions/8931/hard-drive-speed-type-extension-attribute#responseChild144484

mccallister
Contributor

I was able to successfully create an EA using the script at the link bumbletech mentioned. Thanks all!

mccallister
Contributor

Caveat. Machines need to update their inventory to JSS though before the SSD EA will populate the field in the inventory display.