使用 msupdate 更新适用于 Mac 的 Microsoft 应用程序
Microsoft AutoUpdate (MAU) 版本 3.18 及更高版本包含 msupdate 命令行工具。 msupdate 工具可用于启动为 Mac 生成的 Microsoft 应用程序(如 Office)的更新过程。 该工具主要用于让 IT 管理员更精确地控制何时应用更新。 可以从 此链接下载最新版本的 MAU。
msupdate 的工作原理是使用本机 XPC 与 MAU 守护程序通信。 在 macOS 10.14 Mojave 及更高版本上,首次运行 msupdate 时可能会看到隐私提示。 如果使用的是 Jamf Pro等企业管理工具,则应部署隐私首选项策略控制 (PPPC) 有效负载,以预先批准访问权限。 可以从GitHub下载此类有效负载的示例。
使用以下步骤开始使用该工具:
- 打开终端应用程序
- 输入
cd /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app/Contents/MacOS
- 运行
./msupdate --help
页面上会显示下列选项:
usage: msupdate <command> [<args> ...] <modifier>
Commands:
-h | --help Show usage information
-c | --config Display current AutoUpdate configuration
-l | --list List available updates for installed Microsoft applications
-i | --install Download and install available updates
Modifiers:
-a | --apps <app> Install specific application updates
-v | --version <app> Only update to a specific version
-w | --wait <secs> Number of seconds to wait for action to complete before returning the current state of the install command
-f | --format Format output results in the specified format
p | plist Property list format
-t | --terminate <secs> Number of seconds to wait before closing opened applications in order for updates to complete
-m | --message <msg> Optional message to display on macOS banner notification to notify user
如何使用 msupdate 的示例
- 显示 MAU 的当前配置参数:
./msupdate --config
- 以计算机可读格式显示当前配置参数:
./msupdate --config --format plist
- 列出所有可用更新:
./msupdate --list
- 下载并安装所有可用更新:
./msupdate --install
- 下载并安装 Word、Excel 和 PowerPoint 的最新更新:
./msupdate --install --apps MSWD2019 XCEL2019 PPT32019
- 下载并安装特定于版本的Outlook更新:
./msupdate --install --apps OPIM2019 --version 16.17.180090901
- 下载并安装Excel的最新可用更新,) (3 分钟等待 180 秒,然后关闭Excel,并显示“Excel将在 3 分钟内关闭以安装更新”。 在 macOS 横幅通知上通知用户:
./msupdate --install --apps XCEL2019 -t 180 -m "Excel will close in 3 minutes to install updates."
备注
若要使用 -t 和 -m 修饰符,必须使用 Microsoft AutoUpdate 4.24 或更高版本。
应用程序标识符
下表列出了 MAU 支持的适用于 Mac 的 Microsoft 应用程序。 指定 --apps
参数时使用标识符。 在命令行上指定多个应用程序时,请使用空格分隔标识符。
应用程序 | 标示符 |
---|---|
Word | MSWD2019 |
Excel | XCEL2019 |
PowerPoint | PPT32019 |
Outlook | OPIM2019 |
OneNote | ONMC2019 |
茂 | MSau04 |
OneDrive | ONDR18 |
Teams | TEAM01 |
Skype for Business | MSFB16 |
Remote Desktop | MSRD10 |
Intune 公司门户网站 | IMCP01 |
Defender ATP | WDAV00 |
Edge Canary | EDCN01 |
Edge 开发 | EDDV01 |
Edge Beta | EDBT01 |
Edge Stable | EDGE01 |
许可帮助程序工具 | OLIC02 |
备注
- Office应用(如 Word 和 Outlook)的标识符可用于以下版本:
- Office for Mac (Microsoft 365或Office 365订阅计划)
- Office LTSC for Mac 2021 (批量许可证)
- Office 2019 for Mac (零售或批量许可证)
- 如果 MAU 本身正在等待更新,则必须应用该更新,然后才能更新任何应用程序。
- 从命令行以交互方式运行时,标识符不区分大小写,但在从 Jamf Pro 等管理工具运行时使用表中的字符大小写。
- 在某些情况下,Microsoft Teams可能会使用 MAU 来提供更新,例如,如果Teams更新程序失败。 但是,不能使用 msupdate 让 MAU 管理Teams的更新,因为Teams无法为管理员提供部署和管理更新的能力。 相反,Teams大约每两周自动更新一次,并提供新功能和质量更新。 有关详细信息,请参阅 Teams 更新流程。