Office for Mac Update Package

  • 18 December 2020
  • 1 reply

Userlevel 5

Sometimes Microsoft Autoupdate is not recognize when office Office for Mac is not patched. This worklet is more of a work around than a solution, so take it for what its worth.

This does require someone to update the version and link each new Office for Mac release to match this site

The worklet will detect when Office for Mac is not at the desired version and then download the patch from Microsoft and install.

Evaluation Code


ver="$(mdls '/Applications/Microsoft' | grep Version | sed -e 's/[[:alpha:]([:space:],",:,=,^-]//g')"

if [[ $ver == "16.44" ]];then
echo "Complaint $ver detected"
exit 0
echo "Non-Compliant $ver detected"
exit 1

Remediation Code

ver="$(mdls '/Applications/Microsoft' | grep Version | sed -e 's/[[:alpha:]([:space:],",:,=,^-]//g')"
echo "$ver detected. Attempting to run installer."
curl -o /tmp/Microsoft_Excel.pkg ''
sudo installer -store -pkg "/tmp/Microsoft_Excel.pkg" -target /

1 reply

That is excellent. Thanks for sharing!