Skip to main content
Question

Extension Attribute Returning Blank on 20% of Mac's

  • February 26, 2025
  • 4 replies
  • 37 views

Forum|alt.badge.img+8

This script works fine as an EA on 80% of our Mac's but returns Blank on the rest.

The APP is there

And it we run this manually on the Mac it returns a result, but as an EA we get a blank.

If it didnt work on all our Mac's I'd understand I'd made a mistake, but its only a handful, any ideas ?

 

#!/bin/bash

ZScalerVersion=$(defaults read /Applications/Zscaler/Zscaler.app/Contents/Info.plist CFBundleShortVersionString)

/bin/echo "<result>$ZScalerVersion</result>"

 

Thanks

4 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • February 26, 2025

What happens if you run jamf recon verbose on an impacted device?


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • February 26, 2025

@HNTIT I recommend writing an EA so that it always returns something (if you're writing an EA that returns a date you _really_ need to return a valid date), even if the call to collect the data somehow fails to generate a result:

 

#!/bin/bash result="Unknown" ZScalerVersion=$(defaults read /Applications/Zscaler/Zscaler.app/Contents/Info.plist CFBundleShortVersionString) if [ -n "$ZScalerVersion" ]; then result="$ZScalerVersion" fi /bin/echo "<result>$result</result>"

 

If you try that does the EA result from one of the impacted Macs return "Unknown" or is it still blank?


Shyamsundar
Forum|alt.badge.img+13
  • Jamf Heroes
  • February 27, 2025

There are chances that the device that gives a Blank doesn't have a Zsacler installed, Please check those devices whether they Zsacler installed. 


Forum|alt.badge.img+4
  • New Contributor
  • February 28, 2025

There are chances that the device that gives a Blank doesn't have a Zsacler installed, Please check those devices whether they Zsacler installed. 


Yeah, if I run it locally, that is what I get since I don't have it installed.