Skip to main content
Solved

Office Mau - Extension Attribute

  • August 27, 2018
  • 4 replies
  • 30 views

Forum|alt.badge.img+3

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,

Best answer by Cornoir

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

4 replies

Forum|alt.badge.img+7
  • Contributor
  • Answer
  • August 27, 2018

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


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • August 27, 2018

Thanks a Lot @Cornoir !


Forum|alt.badge.img+7
  • Contributor
  • August 27, 2018

No worries


Forum|alt.badge.img+4
  • New Contributor
  • June 27, 2019

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?