Posted on 03-28-2018 11:33 AM
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?
Posted on 03-28-2018 11:45 AM
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.
Posted on 03-28-2018 11:46 AM
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>"
Posted on 03-28-2018 11:46 AM
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
Posted on 03-28-2018 12:37 PM
I was able to successfully create an EA using the script at the link bumbletech mentioned. Thanks all!
Posted on 03-28-2018 12:38 PM
Caveat. Machines need to update their inventory to JSS though before the SSD EA will populate the field in the inventory display.