Inventory Report: External Devices

sstott
New Contributor

Hello,

I am currently implementing an IT Asset Management Systems and would like to obtain the serial number, Model and manufacturer in an extension attribute.

I have run into some walls with some of the scripts I have tried. I have obtained about 50% of the displays with the attached script but am running into issues with other variations of monitors and in particular, docking stations; neither appear.

!/bin/sh

serial=system_profiler SPDisplaysDataType | grep -i "Display Serial Number" | sed -e 's/^[ ]*//' | cut -d " " -f 4

if [ "$serial" != "" ]; then

echo "<result>$serial</result>"

else

echo "<result>Display Not Found</result>"

fi

exit 0

1 REPLY 1

sstott
New Contributor

I have dug a little deeper and found a wonderful script by Todd McDaniel by reviewing the catalogue below:

https://www.jamf.com/jamf-nation/third-party-products/files/extension-attributes

Wondrous Script but missing the serial number:
https://www.jamf.com/jamf-nation/third-party-products/files/944/inventory-attached-displays

However, I have not found a successful way to determine the Manufacturer, Model and Serial number of a docking station.
I did sumble upon: https://www.jamf.com/jamf-nation/discussions/14562/extension-attribute-for-thunderbolt-dock-serial-number

But I cannot seem to make it work.