Skip to main content
Question

Office License Extension Attribute

  • November 9, 2021
  • 1 reply
  • 40 views

Forum|alt.badge.img+2

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?

1 reply

YanW
Forum|alt.badge.img+11
  • Contributor
  • November 10, 2021

copy the whole thing from the Office_License.sh

Computer Management > Inventory Display

In All Computers now has Office License column