11-09-2021 02:22 PM - edited 11-09-2021 02:35 PM
Found it. I am blind. Thanks for all your help!!
Attempting to use the following script to create an extension attribute.
https://github.com/pbowden-msft/ExtensionAttributes/blob/master/Office_License.sh
However it does not seem to work. I have tried setting the IFs to a variable and then pass that variable as the result. Still does not work.
if [ "$PERPETUALPRESENT" = "Yes" ] && [ "$O365ACTIVATIONS" ]; then
result="$LICTYPE and Office 365 licenses detected"
elif [ "$PERPETUALPRESENT" = "Yes" ]; then
result="$LICTYPE"
elif [ "$O365ACTIVATIONS" ]; then
result="Office 365 activations: $O365ACTIVATIONS"
elif [ "$PERPETUALPRESENT" = "No" ] && [ ! "$O365ACTIVATIONS" ]; then
result="No license"
fi
echo "<result>$result</result>"
exit 0
The script works if ran manually in terminal. Any suggestions?
Posted on 11-10-2021 06:25 AM
copy the whole thing from the Office_License.sh
Computer Management > Inventory Display
In All Computers now has Office License column