Script to delete Microsoft AutoUpdate.app from user library

jangelini
New Contributor

Hello JAMF Nation,

This is my first post so be gentle. I am trying to create a basic script that will delete the Microsoft AutoUpdate.app from the Library. End game = I do not want users updating their own versions of Office and creating a SUS is not possible. So I figure deleting the MAU app will suffice for now. The problem is I cant get any scripting to accomplish what Im trying to do. Any help would greatly be appreciated!

Signed,

Beginner JAMF guy.

1 ACCEPTED SOLUTION

joshuaaclark
Contributor

Create a policy in the JSS using File and Processes. Under EXECUTE COMMAND, paste rm -rf "/Library/Application Support/Microsoft/MAU2.0" . Scope it and watch it work.

View solution in original post

6 REPLIES 6

joshuaaclark
Contributor

/bin/bash

rm -rf "/Library/Application Support/Microsoft/MAU2.0"

joshuaaclark
Contributor

Create a policy in the JSS using File and Processes. Under EXECUTE COMMAND, paste rm -rf "/Library/Application Support/Microsoft/MAU2.0" . Scope it and watch it work.

donmontalvo
Esteemed Contributor III

If you're removing Microsoft AutoUpdate (MAU) to remove users' ability to update themselves, well, they need admin rights to do so.

If they already have admin rights, https://macadmins.software/ is a couple clicks away. ¯_(ツ)_/¯

If you're doing this because of the new, and very annoying, 90> day banner, which comes up if your install is more than 90 days behind the latest stable version (see above URL):

edefc29abab0485fa79fd5597e63e098

This can be fixed by "touching" the Info.plist file in Excel, Word, and Powerpoint. Outlook and OneNote do not show that banner:

#!/bin/sh
# Temporarily suppress 90> prompts for Excel, Powerpoint, and Word.
# Thanks to our hero Paul Bowden at Microsoft. :slightly_smiling_face: 20171213 DM

if [ -e /Applications/Microsoft Excel.app ]; then
    echo "Microsoft Excel exists, suppressing 90> prompt..."
    /usr/bin/touch -mt 201712121212 /Applications/Microsoft Excel.app/Contents/Info.plist
else
    echo "Microsoft Excel does not exist."
fi

if [ -e /Applications/Microsoft PowerPoint.app ]; then 
    echo "Microsoft Powerpoint exists, suppressing 90> prompt..."
    /usr/bin/touch -mt 201712121212 /Applications/Microsoft PowerPoint.app/Contents/Info.plist
else
    echo "Microsoft Powerpoint does not exist."
fi

if [ -e /Applications/Microsoft Word.app ]; then
    echo "Microsoft Word exists, suppressing 90> prompt..."
    /usr/bin/touch -mt 201712121212 /Applications/Microsoft Word.app/Contents/Info.plist
else
    echo "Microsoft Word does not exist."
fi

exit 0

MAU 4 won't require a Microsoft Caching Server, it'll instead allow you to have clients download approved versions directly from Microsoft. So not sure how removing MAU is going to help in any scenario, given our ability to manage its behavior.

--
https://donmontalvo.com

scottb
Honored Contributor

@jangelini So, dumb question, why not just restrict MAU in the JSS? That way, if you need to change things, it's still there and ready to use?

donmontalvo
Esteemed Contributor III

@scottb +1

--
https://donmontalvo.com

scottb
Honored Contributor

I should add that I am the first one that often looks for a complex solution to an easy fix. It's easy to do, but if you're just looking for help on scripts, I understand that.
For that, you may want to jump into "macadmins" on Slack. There's a bash channel there which is a great help!