Filter Out SSD Machines?

betty02
New Contributor II

Strange one, but - is it possible to do a filter or search on Casper to show us all the machines with an SSD and all the ones without?

Just as weve been doing a swap and trying to keep track of ones weve done and the ones that need upgrading?

Thanks
Simon

1 ACCEPTED SOLUTION

carlo_anselmi
Contributor III

Hello we use an Extension Attribute from this script
I think I found it within some Jamf Nation post a while ago
Hope it helps
Ciao
Carlo

#!/bin/sh

disk0=`diskutil info disk0 | grep "Solid State" | awk '{ print $3 }'`
disk1=`diskutil info disk1 | grep "Solid State" | awk '{ print $3 }'`

if [[ $disk0 == "Yes" ]]; then

echo "<result>disk0 is SSD</result>"
exit 0

elif [[ $disk1 == "Yes" ]]; then

echo "<result>disk1 is SSD</result>"
exit 0

fi

echo "<result>No SSD Drives</result>"

exit 0

View solution in original post

4 REPLIES 4

carlo_anselmi
Contributor III

Hello we use an Extension Attribute from this script
I think I found it within some Jamf Nation post a while ago
Hope it helps
Ciao
Carlo

#!/bin/sh

disk0=`diskutil info disk0 | grep "Solid State" | awk '{ print $3 }'`
disk1=`diskutil info disk1 | grep "Solid State" | awk '{ print $3 }'`

if [[ $disk0 == "Yes" ]]; then

echo "<result>disk0 is SSD</result>"
exit 0

elif [[ $disk1 == "Yes" ]]; then

echo "<result>disk1 is SSD</result>"
exit 0

fi

echo "<result>No SSD Drives</result>"

exit 0

betty02
New Contributor II

@carlo.anselmi

Perfect! Works!! What did you put in as your criteria? "if not 'No SSD Drives'"

Thanks

carlo_anselmi
Contributor III

Where "Tipo disco" is the given name to EA
Ciao
Carlo

9b1f040077d64ad8b50260f0300562ab

betty02
New Contributor II

Yeah thats what we've got! Cheers! Really helps!