Skip to main content

Hi Folks,



I'm trying to create an extension attribute to get the MAU status.



By the script is working fine:





But using the same code to create an Extension Attribute is not working.



Does anyone has a tip to solve this?



Thanks in advance,

MAU How to Check Status EA settings;
Data Type : String
Inventory Display : General
Input Type : Script





SCRIPT



!/bin/bash



#



Name: MAU_HowToCheck.sh



Description: This EA for Jamf Pro Servers checks for the HowToCheck setting



on a Mac with Office installed. Useful as a Smart Computer



Group for scoping policies and configuration profiles.



Author: Dr. Emily Kausalik (drkausalik@gmail.com)



Created: 2016-08-17



loggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')



HowToCheck=$(defaults read /Users/$loggedInUser/Library/Preferences/com.microsoft.autoupdate2.plist HowToCheck)



if [ "$HowToCheck" ]; then
echo "<result>$HowToCheck</result>"
else
echo "<result>Not Installed</result>"
fi


Thanks a Lot @Cornoir !


No worries


OK, so this was a long time ago, hopefully someone responds, but what Value(s) would you look for this to return to make a Smart Computer Group from this EA?


Reply