Skip to main content
Question

Smart group for computers with SSD drives?

  • March 28, 2018
  • 5 replies
  • 12 views

Forum|alt.badge.img+6

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

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • March 28, 2018

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.


Forum|alt.badge.img+8
  • Valued Contributor
  • March 28, 2018

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>"

Forum|alt.badge.img+12
  • Valued Contributor
  • March 28, 2018

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


Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 28, 2018

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


Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 28, 2018

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