Software Update Server Reporting

easyedc
Valued Contributor II

In our environment, we wanted to confirm which workstations weren't using our in-house Software Update Server but were hitting the generic Apple Updater. The JAMF script left a blank response if it hit the public Update Server, but it also responded with a blank response if it failed. I scoured the forums and didn't find anything that met my needs out of the box. After some trial and error, I took the provided JAMF extension attribute and modified it to meet our basic needs. It seems to get the job done. Hopefully this can save you time in the future if you need to do the same.

#!/bin/sh

SWU=`defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist CatalogURL`

if [[ -z $SWU ]]; then 
    echo "<result>App Store</result>" 
else
    echo "<result>$SWU</result>"
fi
0 REPLIES 0