Office Mau - Extension Attribute

ibmbancointer
New Contributor II

Hi Folks,

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

By the script is working fine:

bb5bfa5250ad4c368e04384ebee7c3ca

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

Does anyone has a tip to solve this?

Thanks in advance,

1 ACCEPTED SOLUTION

Cornoir
Contributor II

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

View solution in original post

4 REPLIES 4

Cornoir
Contributor II

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

ibmbancointer
New Contributor II

Thanks a Lot @Cornoir !

Cornoir
Contributor II

No worries

supson
New Contributor III

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?