Jamf Helper命令

Jamf Pro 說明文件 11.21.0

Solution
Application
Content Type
技術說明文件
Utilities & Services
version
11.21.0
ft:locale
zh-TW
vrm_version
11.21.0

常用參數

下表顯示常用的參數:

參數說明範例值
-windowType視窗樣式utilityhudfs
-title視窗標題文字"Software Update"
-description主訊息文字"Updates are being installed..."
-button1主要按鈕文字"OK"
-button2輔助按鈕文字(任選)"Cancel"
-icon圖示檔的路徑/System/Library/CoreServices/Software Update.app/Contents/Resources/SoftwareUpdate.icns
-timeout自動關閉時間(秒)60

如需關於所有可用參數及其用法的完整清單,請在管理式電腦上使用-help參數執行Jamf Helper:

/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help

範例用例

顯示逾時訊息
#!/bin/bash

"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \
-windowType "hud" \
-title "Maintenance Notice" \
-description "Maintenance will begin in 5 minutes. Please save your work." \
-timeout 300 \
-countdown
請求使用者確認
#!/bin/bash

"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \
-windowType "utility" \
-title "Software Installation" \
-description "Click Install to begin the installation process." \
-button1 "Install" \
-button2 "Cancel" \
-defaultButton 1
請求使用者輸入
#!/bin/bash

# Ask for t-shirt size
SELECTION=$("/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \
-windowType "utility" \
-title "T-Shirt Size Survey" \
-heading "Company Swag Order" \
-description "Please select your t-shirt size for the upcoming company event:" \
-icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Clipboard.icns" \
-button1 "Small" \
-button2 "Medium" \
-button3 "Large" \
-button4 "XL" \
-defaultButton 2)

# Store the response
case $SELECTION in
    0) SIZE="Small";;
    1) SIZE="Medium";;
    2) SIZE="Large";;
    3) SIZE="XL";;
    *) SIZE="No selection made";;
esac

# Display confirmation
"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" \
-windowType "utility" \
-title "Thank You" \
-description "Your size ($SIZE) has been recorded." \
-icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarFavoritesIcon.icns" \
-button1 "OK"
注意:

此範例顯示了收集使用者輸入的基本概念。對於生產環境用途,您需要新增程式碼以儲存收集的資料,例如更新延伸功能屬性。請與您的IT管理員聯絡以取得完整的實作詳細資訊。