Microsoft AutoUpdate (MAU) version 3.18 msupdate command-line tool

scottlep
Contributor

From https://docs.microsoft.com/en-us/DeployOffice/mac/update-office-for-mac-using-msupdate

"Microsoft AutoUpdate (MAU) version 3.18 and later includes the msupdate command-line tool. This can be used to start the Office for Mac update process, in addition to reporting the current AutoUpdate configuration. The tool is primarily designed for IT administrators so that they have more precise control over when updates are applied. Use the following steps to start using the tool"

Is anyone using this yet as a scripted way to update MSO2016? Perhaps similar to doing scripted updates for Chrome and Firefox? I was going to set up a test policy, triggered to run once per week. It seems to work as expected via command line and Unix command via Apple Remote Desktop. It even seems to delay the update of any apps that may be running and then installs once the app has quit. I have also added inventory collection for /Library/Application Support/Microsoft/ to be sure clients are running MAU 3.18 so policies can be scoped only to those where the msupdate commands will actually work.

53 REPLIES 53

mpermann
Valued Contributor II

@scottlep have you checked out the script Paul Bowden of Microsoft wrote and posted over on GitHub? I've used it and it seems to work fine.

jsherwood
Contributor

Not tried it yet but it's on the never-ending list of things to do!

Following some of the discussions on the #mau4 channel on Slack it has been stated that this version of “msupdate” is a command-line wrapper around the same logic that the GUI app uses and as a result doesn't (yet) have the same granular deployment capabilities that will come with the full MAU4 when it ships.

triding
New Contributor III

Probably a dumb question I know, but where can you get the MAU 4 Beta from as per Paul's great instruction video?

EDIT: It appears to be 3.18.18041000 - for now.

AVmcclint
Valued Contributor III

I’d like to use it similarly to softwareupdate -d -a to cache the installers first then let users do the install via Self Service when they want.

talkingmoose
Honored Contributor II

@jsherwood, MAU 3.18 is effectively MAU 4.0. The version didn't change to 4.0 because of some technical issues with the numbering that were only internal to Microsoft. They'll rev the version next month.

The msupdate command offers far more control over how you can time and apply updates than the GUI. There's not much more work to be done. This is the version Mac admins are looking for.

You can use MAU 3.18 to:

  • report on available updates (useful for extension attributes)
  • return the report in plist format for easy parsing
  • install all updates
  • install updates for specific applications
  • install specific (older) updates instead of current (for those orgs who choose to remain behind a while)

Combined with Jamf, you can:

  • schedule when updates get applied
  • remotely update machines immediately via Jamf Remote

What's left to come in 4.0 in May is ultra-thin updates. This should be the first production release to take advantage of Apple's software diff technology to allow bit-level updates instead of file level updates. Microsoft hopes to deliver delta updates for the entire suite that are cumulatively far less than the Microsoft Office for Mac 2011 updates that averaged around 100 MB.

Ultra-thin updates are independent of msupdate. You'll get these with msupdate once Microsoft begins releasing them to production.

jsherwood
Contributor

@talkingmoose Thanks for putting the record straight - will fire up the lab machine and have a play...

EdLuo
Contributor

I have a manifest server setup to control Office updates. It is working great for internal users but not so well for remote users. In my testing to use msupdate in a policy for those remote users, I ran into this bug where msupdate will detect updates but refuses to install them.

Loaner05:MacOS loaner$ ./msupdate -l
Checking for updates...
Updates available:
  ONMC15  OneNote Update 16.12.0 (18041000)
  XCEL15  Excel Update 16.12.0 (18041000)
  PPT315  PowerPoint Update 16.12.0 (18041000)
  OPIM15  Outlook Update 16.12.0 (18041000)
  MSWD15  Word Update 16.12.0 (18041000)
Loaner05:MacOS loaner$ ./msupdate -i -a ONMC15,XCEL15,PPT315,MSWD15
Detecting and downloading updates...
No updates applied
Loaner05:MacOS loaner$ ./msupdate --install --apps ONMC15,XCEL15,PPT315,MSWD15
Detecting and downloading updates...
No updates applied

Note that ./msupdate --install works fine but I need to use the --apps switch to avoid updating Outlook due to a contacts search bug.

If you need to use the --apps switch, wait for a fix or try setting up a manifest server.

sdagley
Honored Contributor II

@EdLuo Any change in behavior if you request an update to a single app and/or a specific version?

EdLuo
Contributor

@sdagley Just tried running ./msupdate --install --apps with only one app at the time and it works. So I'll separate the command into 4 lines to get my desired result.

I didn't test --version switch today.

Thanks for your suggestion.

sdagley
Honored Contributor II

@EdLuo Good to hear. Let's mention @pbowden in this discussion in the hopes he'll comment on the bug you discovered in msupdate.

abrahamT
New Contributor III

@scottlep did you mean like this:

#!/bin/bash
# Microsoft Office update
# Runs the msupdate command tool to auto-update and patch
# Microsoft Office 2016 to the latest version.
#################################################################
# Variables
#################################################################
msupdatePath="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS"
currentUser=$(stat -f%Su /dev/console)

#################################################################
# Logic
#################################################################

if [ ! -f "$msupdatePath"/msupdate ]; then
    echo "FAILED: System is not running MS UPDATE 3.18."
    exit 1
fi

if [ ! -f "/Users/$currentUser/Library/Preferences/com.microsoft.autoupdate2.plist" ]; then
    echo "FAILED: could not find the com.microsoft.autoupdate2.plist file to read any preferences."
else
    howToCheck=$(defaults read /Users/$currentUser/Library/Preferences/com.microsoft.autoupdate2 HowToCheck)
    if [ "$howToCheck" != "Manual" ]; then
        defaults write /Users/$currentUser/Library/Preferences/com.microsoft.autoupdate2 HowToCheck Manual
        if [ "$howToCheck" != "Manual" ]; then
            echo "FAILED: Could not reset the how to check preferences to Manual."
        else
            echo "SUCCESSFUL: Changed the how to check preference to Manual."
        fi
    fi
fi

echo "Running Microsoft Updater"
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate -i

EdLuo
Contributor

@abrahamT Have you tested your script on a system while MS Office apps are opened? Of the few system I tested, msupdate installs the update without prompting user of choice for Later or Restart. This leaves the running app in an unstable state. My guess is that the script is running as root while the apps are opened under the user's account. Can you confirm the lack of prompt? Also try replacing your last line with the line below to see if prompts will appear.

su -l $currentUser -c "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate -i"

I'll need to test this myself when I get a chance.

pbowden
Contributor III

@EdLuo ...yes, you need to run msupdate in the context of the logged-on user. The msupdatehelper script that I wrote takes care of this. See https://github.com/pbowden-msft/msupdatehelper

Thanks for the bug report on the multiple app issue. Yes, known bug (#2292004).

Thanks, Paul.

abrahamT
New Contributor III

@EdLuo I do not need to run the command as the logged in user. The user DOES receive a prompt via the built-in OS notification banner that asks if they want to update Later or Restart the app ONLY when the application is open. When an application is running, the update will not force them to quit.

I've ran this in our environment via JAMF and it runs in the root context. I've tried to run it as the user following the above suggestion and that works as well.

pbowden
Contributor III

@EdLuo The issue with the multiple app updates is in fact the documentation/help - the appId separator should be a space rather than comma. I've updated the article at https://docs.microsoft.com/DeployOffice/mac/update-office-for-mac-using-msupdate
MAU 4.0 which releases on 5/15 will have a fix to the built-in --help content.

bainter
Contributor

@EdLuo @pbowden I'm running into the same issue, Word and Excel 16.11 documents open and they are updated to 16.12 with no notifications. Using Paul's script downloaded today and policies configured per the tutorial. Checked that Notifications is not set to Do Not Disturb, etc.

nfriedl
New Contributor

@pbowden Should this work if no user is logged in? Tried your helper script (which is working great, thanks), and AutoUpdate crashed with no one logged in...

<edit> Haven't been able to recreate the crash, it seems to not be able to download/install updates if no one is logged in. Which I assume is as expected.

mlitton
New Contributor II

What version of Office and later can MAU 3.18 be installed on?

IE You can install MAU 3.18 on devices running Office versions 15.1.? or later

mccallister
Contributor

mlitton, I installed MAU 3.18 today on a client that was running Office 15.24 and it worked with that. I had errors trying to use the following command line tool script (though manually running autoupdate app at the computer detected and installed updates).

cd /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS
./msupdate --install

cwaldrip
Valued Contributor

How do I flush the local cache for msupdate, or update its information. I've had problems with it updating all the apps. For example, on one test machine everything got updated to 16.13 (released in the midst of my testing - joy), but on another test machine Word is still 16.12, and msupdate -l doesn't show any updates available.

Edit: I figured out the data is stored in com.microsoft.autoupdate2.plist. I trashed the file and re-ran msupdate -l and it built a fresh list. Not ideal though.

HNTIT
Contributor II

@pbowden

This has been working fine for me.

However in May all my machines office apps updated to the 1805 Build version, but only 1 Machines MAU got updated.

That machine shows as 4.0.1805, but all the rest are stuck at 3.18.1804

This month nothing has had any 1806 updates at all so far.

Are there issues this month or delayedNo updates ?

What happened to MAU last month, was 4.0 released and then pulled ?

donmontalvo
Esteemed Contributor II

@pbowden been waiting for this jewel. 🙂

Checked MAU4 version:

$ defaults read /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/Info CFBundleVersion
4.0.18061000

Did a quick test last night...guessing we can't alias to the msupdate tool?

$ ls -l /usr/local/bin/msupdate
lrwxr-xr-x  1 root  wheel  94 Jun 13 21:16 /usr/local/bin/msupdate -> /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate
$ msupdate -l
Checking for updates...
No result returned from Update Assistant

Works fine if the entire path is used:

$ "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" -l
Checking for updates...
Updates available:
  ONMC15  OneNote Update 16.15.0 (18061201)
  MSWD15  Word Update 16.15.0 (18061201)
  XCEL15  Excel Update 16.15.0 (18061201)
  PPT315  PowerPoint Update 16.15.0 (18061201)
  OPIM15  Outlook Update 16.15.0 (18061201)

Or if you cd to the path and run from there:

$ cd "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/"
$ ./msupdate -l
Checking for updates...
Updates available:
  ONMC15  OneNote Update 16.15.0 (18061201)
  MSWD15  Word Update 16.15.0 (18061201)
  XCEL15  Excel Update 16.15.0 (18061201)
  PPT315  PowerPoint Update 16.15.0 (18061201)
  OPIM15  Outlook Update 16.15.0 (18061201)

Bug?

Feature request?

I had all Microsoft apps closed. When the command completed, this is the output I got:

$ ./msupdate --install
Detecting and downloading updates...
Downloaded updates:
  XCEL15
  MSWD15
  OPIM15
Finished updates:
  PPT315
  ONMC15

Confirmed no updates available:

$ ./msupdate --list
Checking for updates...
No updates available

When I launched Word, it gave me a dialog saying Word is being updated.

@pbowden seemed like Powerpoint (PPT315) and OneNote (ONMC15) completed updating before the ./msupdate --install command completed?

Logs show Powerpoint and OneNote updated first, so the ./msupdate --install command probably didn't wait for the other apps to update, instead it reported which completed update and then exited.:

$ cat /Library/Logs/Microsoft/autoupdate.log | grep "Successfully installed update" | grep 18061201
2018-06-13 21:26:55 [Microsoft Update Assistant] <Info> Successfully installed update: "PowerPoint Update 16.15.0 (18061201)" with version: 16.15.18061100.
2018-06-13 21:27:34 [Microsoft Update Assistant] <Info> Successfully installed update: "OneNote Update 16.15.0 (18061201)" with version: 16.15.18061100.
2018-06-13 21:28:33 [Microsoft Update Assistant] <Info> Successfully installed update: "Excel Update 16.15.0 (18061201)" with version: 16.15.18061100.
2018-06-13 21:29:29 [Microsoft Update Assistant] <Info> Successfully installed update: "Word Update 16.15.0 (18061201)" with version: 16.15.18061100.
2018-06-13 21:30:54 [Microsoft Update Assistant] <Info> Successfully installed update: "Outlook Update 16.15.0 (18061201)" with version: 16.15.18061100.

Thanks,
Don

--
https://donmontalvo.com

talkingmoose
Honored Contributor II

Paul will correct me if I'm wrong, but msupdate ain't the whole shebang.

It calls the enclosing Microsoft AutoUpdate files to actually do the work. Trying to run it from outside the context of the Microsoft AutoUpdate.app bundle probably doesn't work because it's trying to find its accompanying support files using relative paths instead of fixed paths.

HNTIT
Contributor II

Does MAU update itself ?

It does not seem to, all the machines I installed 3.18 on still have it even though 4.0 is now available.

I tried installing 4.0.1805 and it does not auto update to 4.0.1806

talkingmoose
Honored Contributor II

@HNTIT, MAU 3.11 and higher is suppose to self-update, yes. But MAU will only update apps that are registered.

You can register apps by simply launching them, however, that will only be for the currently logged in user. To register them for everyone, use a configuration profile.

  1. Open a plain text editor and paste the following plist. Save the file as com.microsoft.autoupdate2.plist.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Applications</key>
        <dict>
        <key>/Applications/Microsoft Excel.app</key>
            <dict>
                <key>Application ID</key>
                <string>XCEL15</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Microsoft OneNote.app</key>
            <dict>
                <key>Application ID</key>
                <string>ONMC15</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Microsoft Outlook.app</key>
            <dict>
                <key>Application ID</key>
                <string>OPIM15</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Microsoft PowerPoint.app</key>
            <dict>
                <key>Application ID</key>
                <string>PPT315</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Microsoft Remote Desktop.app</key>
            <dict>
                <key>Application ID</key>
                <string>MSRD10</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Microsoft Word.app</key>
            <dict>
                <key>Application ID</key>
                <string>MSWD15</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Applications/Skype for Business.app</key>
            <dict>
                <key>Application ID</key>
                <string>MSFB16</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
            <key>/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app</key>
            <dict>
                <key>Application ID</key>
                <string>MSau03</string>
                <key>LCID</key>
                <integer>1033</integer>
            </dict>
        </dict>
        <key>StartDaemonOnAppLaunch</key>
        </true>
    </dict>
    </plist>
  2. In Jamf Pro, choose Computers > Configuration Profiles and create a new configuration profile. Name it how you like. Set it to apply at Computer level.

  3. Add a Custom Settings payload and upload the com.microsoft.autoupdate2.plist file and save. (If you receive an error when uploading, follow the instructions onscreen in red.)

  4. Scope the configuration profile to your devices.

Now, regardless of whether a user invokes Microsoft AutoUpdate or you invoke it via the msupdate command, all the apps in the plist should receive available updates.

sdagley
Honored Contributor II

@talkingmoose That entry for StartDaemonOnAppLaunch should be:

<key>StartDaemonOnAppLaunch</key>
    <true/>

burdett
Contributor

@sdagley Thanks! I just ran in to this.

HNTIT
Contributor II

The Apps are all registered, however MAU does not seem to be Updating.

mbracco
Contributor

Hello,

when running the msupdate as root the msupdate binary throughs out a crash log. running the same as a locally logged in user works.
May someone know what's wrong ?
after 2nd or 3rd run as root the error goes away but
msupdate -l
Checking for updates...
No result returned from Update Assistant

gives always no result.

Mike

sdagley
Honored Contributor II

@mbracco You're not supposed to run msupdate as root. If you use @pbowden's script for calling the tool via Jamf (https://github.com/pbowden-msft/msupdatehelper) it'll handle that for you. Note the link on that page for the video tutorial on msupdate.

sdagley
Honored Contributor II

@HNTIT Have you updated MAU itself?

mbracco
Contributor

ok for that. i tried to run a policy with msupdate -i to install all updates. maybe the wrong turn. I'll give the script a try ...
Thank you for your help

Mike

HNTIT
Contributor II

@sdagley

All my Machines are on MAU 3.18.1804.

That's the Version I deployed via JAMF.

I manually downloaded and installed 4.0.1805 on a test machine to see if THAT would update to 4.0.1806 but it didn't.

sdagley
Honored Contributor II

@HNTIT The current version of MAU is 4.0.18061000 and you need it for the Office 16.14.18061302 updates.

HNTIT
Contributor II

@sdagley

All my Machines are all running MAU 3.18.1804.
All my Machines have already auto-updated the office apps 16.13.1805 or 16.14.1806

I am still waiting for them to autoupdate MAU to 4.0.1805 or 4.0.1806, that's the issue I have, the Office Apps auto-update perfectly, it's just MAU that dosent

sdagley
Honored Contributor II

@HNTIT I have auto updates disabled, and only update by calling msupdate via @pbowden's Jamf Helper script. I wasn't able to deploy the Office 16.14.0.18061000 updates with MAU 4.0.1805 so I used Jamf Pro to deploy MAU 4.0.1806 (you'll find a link to the standalone MAU installer at macadmins.software). It may also be possible to use the config profile @talkingmoose posted earlier in this thread make sure MAU is in the list of apps that should be updated. Or you can call msupdate directly to update MAU.

HNTIT
Contributor II

@sdagley

I did the same as you a couple of months back, I Deployed MAU 3.18.1804 with JAMF under the assumption is should self update.
I have a config profile with all the Applicatons registered for updated, MAU included.

if I manually run msupdate it says MAU has no updates available

HNTIT
Contributor II

If I run msupdate -c I get this, which would sort of imply the AutoUpdate App is registered for updates but it does not know what version is installed??

AutoUpdateVersion = "3.18.18041000"; ChannelName = Production; HowToCheck = Manual; LastCheckForUpdates = "29 Dec 1 at 23:58:45"; ManifestServer = ""; RegisteredApplications = ( { "Application ID" = MSRD10; ApplicationPath = "/Applications/Microsoft Remote Desktop.app"; VersionOnDisk = 983; }, { "Application ID" = MSFB16; ApplicationPath = "/Applications/Skype for Business.app"; VersionOnDisk = "16.18.51"; }, { "Application ID" = IMCP01; ApplicationPath = "/Applications/Company Portal.app"; VersionOnDisk = "52.1805002.000"; }, { "Application ID" = OPIM15; ApplicationPath = "/Applications/Microsoft Outlook.app"; VersionOnDisk = "16.14.18061302"; }, { "Application ID" = ONMC15; ApplicationPath = "/Applications/Microsoft OneNote.app"; VersionOnDisk = "16.14.18061302"; }, { "Application ID" = PPT315; ApplicationPath = "/Applications/Microsoft PowerPoint.app"; VersionOnDisk = "16.14.18061302"; }, { "Application ID" = MSWD15; ApplicationPath = "/Applications/Microsoft Word.app"; VersionOnDisk = "16.14.18061302"; }, { "Application ID" = MSau04; ApplicationPath = "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"; }, { "Application ID" = XCEL15; ApplicationPath = "/Applications/Microsoft Excel.app"; VersionOnDisk = "16.14.18061302"; } ); StartDaemonOnAppLaunch = false; UpdateCache = "";

sdagley
Honored Contributor II

@HNTIT You might want to post a question for @pbowden in the MAU4 channel on the MacAdmins Slack