欢迎各位兄弟 发布技术文章
这里的技术是共享的
ScheduleOSUpdate
在 Jamf Pro API 中的含义在 Jamf Pro API 中,ScheduleOSUpdate
是一个 计算机命令(Computer Command),用于向 macOS 设备 发送系统更新(macOS 升级或补丁)的安装计划。
让 Jamf Pro 远程安排 macOS 设备安装系统更新(如 macOS 小版本更新、完整大版本升级)。
适用于:
企业 IT 管理的 Mac 设备。
需要通过 Jamf Pro 批量推送 macOS 更新 的场景。
macOS 大版本升级(如 macOS Ventura → macOS Sonoma
)。
小版本更新(如 macOS 14.4 → macOS 14.5
)。
安全补丁(如 2024-001 Security Update
)。
xml<computer_command> <general> <command>ScheduleOSUpdate</command> <os_update> <action>download</action> <!-- 或 "install" --> <product_key>macOS Sonoma</product_key> <!-- 更新的具体版本 --> </os_update> </general> <computers> <computer> <id>123</id> <!-- 目标设备的 Jamf ID --> </computer> </computers> </computer_command>
参数 | 可选值 | 说明 |
---|---|---|
<action> | download 、install | download (仅下载但不安装)、install (下载 + 安装) |
<product_key> | 如 macOS Sonoma 、MSU_Update_2024-001 | 指定具体的更新包(可查 Jamf Pro 可用的更新列表) |
<computer_id> | Jamf Pro 设备 ID | 目标设备(可多个) |
curl
调用示例bashcurl -X POST \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/xml" \ -d ' <computer_command> <general> <command>ScheduleOSUpdate</command> <os_update> <action>install</action> <product_key>macOS Sonoma</product_key> </os_update> </general> <computers> <computer> <id>123</id> </computer> </computers> </computer_command>' \ "https://your-jamf-server.com/JSSResource/computercommands/command/ScheduleOSUpdate/id/123"
取决于 <action>
和 设备策略:
<action> | 触发方式 | 用户是否可干预? |
---|---|---|
download | 仅下载更新(不安装) | 用户需手动安装 |
install | 下载 + 安装 | 默认 后台静默安装(可配置是否弹窗提示) |
设备在线:Jamf Pro 会立即推送命令(通常在几分钟内生效)。
设备离线:下次 Check-In(通常 15 分钟 ~ 1 小时)时执行。
安装时间:
小更新(如安全补丁)可能 不需要重启。
大版本升级(如 Sonoma → 新版本)会 强制重启设备(建议安排在非工作时间)。
macOS 10.13+(旧版本可能不支持)。
设备需管理(Jamf Agent 正常运行)。
用户权限:
普通用户可能无法安装大版本更新(需管理员权限)。
企业可配置 无人值守安装(不弹窗)。
延迟安装:可通过 Deferral
策略让用户选择稍后安装。
强制更新:结合 Enforce
策略,设置截止时间(逾期强制安装)。
先测试再批量部署(避免大规模设备意外升级)。
使用 download
模式提前缓存更新(减少占用带宽)。
结合维护窗口(避免影响工作时间)。
监控更新状态(通过 Jamf Pro 报告或 sudo softwareupdate --list
)。
ScheduleOSUpdate
是 Jamf Pro 提供的 macOS 远程更新管理功能,适用于企业 IT 批量控制设备升级。通过 API 调用可灵活控制 下载、安装、更新版本、目标设备,适合自动化运维。
⚠️ 注意:大版本升级可能重启设备,务必提前通知用户!