Skip to main content
Solved

Apple Studio Display

  • January 16, 2023
  • 6 replies
  • 57 views

retroroscoe
Forum|alt.badge.img+7

Hi All,

We have just purchased 3 Mac Studios with Apple Studio Displays.

The problem is I would like to record the serial/asset numbers of the displays to the Mac Studio they are connected to.

Anyone got any ideas around this?

Best answer by PhillyPhoto

I wrote an EA for the firmware and saw this post, and figured why not one for the serial number too? This should work:

#!/bin/bash result="<result>NOT Found</result>" if [[ $(system_profiler SPDisplaysDataType | grep -i "Studio Display") != "" ]] then dispSN1=$(system_profiler SPDisplaysDataType | grep -i "Display Serial Number:") dispSN2=${dispSN1#*: } dispSN3=${dispSN2%\\n*} result="<result>$dispSN3</result>" fi echo "$result"

6 replies

DTB_Kirky
Forum|alt.badge.img+7
  • Jamf Heroes
  • January 16, 2023

You can create a Computer Management, Extension Attribute, set it to :

Data Type: String

Input Type: Text Field

 

You can then edit this field within the computers inventory page and set it to the serial number


Forum|alt.badge.img+21
  • Valued Contributor
  • January 16, 2023

Is the display serial number shown in a System Profiler report?  If so, you could code a EA to parse out the serial and return it using this command:

/usr/sbin/system_profiler

 


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • January 17, 2023

If you are wanting to record the SN's grabbing them from the Mac is possible as others have suggested. However, recording SN's for fixed assets is more of an accounting problem. When the Displays were purchased there should have been a PO, that PO should have the SN's on it. If your org is letting people buy stuff outside of ecommerce, then getting the data from the Mac is your only option to not involve the users.


Forum|alt.badge.img+13
  • Valued Contributor
  • Answer
  • March 28, 2023

I wrote an EA for the firmware and saw this post, and figured why not one for the serial number too? This should work:

#!/bin/bash result="<result>NOT Found</result>" if [[ $(system_profiler SPDisplaysDataType | grep -i "Studio Display") != "" ]] then dispSN1=$(system_profiler SPDisplaysDataType | grep -i "Display Serial Number:") dispSN2=${dispSN1#*: } dispSN3=${dispSN2%\\n*} result="<result>$dispSN3</result>" fi echo "$result"

retroroscoe
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 28, 2023

Thank you PhillyPhoto, that worked perfectly

 

 


Forum|alt.badge.img+1

I wrote an EA for the firmware and saw this post, and figured why not one for the serial number too? This should work:

#!/bin/bash result="<result>NOT Found</result>" if [[ $(system_profiler SPDisplaysDataType | grep -i "Studio Display") != "" ]] then dispSN1=$(system_profiler SPDisplaysDataType | grep -i "Display Serial Number:") dispSN2=${dispSN1#*: } dispSN3=${dispSN2%\\n*} result="<result>$dispSN3</result>" fi echo "$result"

This is perfect, worked like a charm. Thank you so much!