Using system_profiler with macOS Sierra

sepiemoini
Contributor III
Contributor III

Hey there, all! I have an extension attribute that I've been using for a few years. With the addition of macOS Sierra, this lookup, specifically "system_profiler" and "SPSerialATADataType" no longer works for MacBookPro13,1 (2TBT3 models) in my organization. Is anyone else noticing this issue?

No results are posted via the JSS or locally when performed in Terminal. It appears that Apple has deprecated "system_profiler" and I am wondering if there is a replacement lookup that others are using.

#!/bin/bash

Medium=$(system_profiler SPSerialATADataType | grep Medium Type | sed -e 's/^[Medium Type: ]*//')

echo "<result>$Medium</result>"
1 ACCEPTED SOLUTION

sepiemoini
Contributor III
Contributor III

This seems to work in testing. Is anyone else using something similar?

#!/bin/bash

Medium=$(diskutil info disk0 | grep "Solid State" | sed -e 's/^[Solid State: ]*//')
echo "<result>$Medium</result>"

View solution in original post

1 REPLY 1

sepiemoini
Contributor III
Contributor III

This seems to work in testing. Is anyone else using something similar?

#!/bin/bash

Medium=$(diskutil info disk0 | grep "Solid State" | sed -e 's/^[Solid State: ]*//')
echo "<result>$Medium</result>"