Skip to main content
Solved

Using system_profiler with macOS Sierra

  • January 11, 2017
  • 1 reply
  • 7 views

sepiemoini
Forum|alt.badge.img+19

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

Best answer by sepiemoini

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

1 reply

sepiemoini
Forum|alt.badge.img+19
  • Author
  • Employee
  • 180 replies
  • Answer
  • January 11, 2017

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