Jamf建議保持您的通知腳本簡單一些。您將使用者保留在設定視窗中,並且他們此時無法實際使用其電腦。考慮僅安裝端點保護軟體和Zero Trust網路存取(ZTNA)產品等必需品。讓使用者能夠使用其電腦和Self Service應用程式來安裝必要的應用程式。考慮使用Jamf Pro內建的macOS上線,讓使用者在背景安裝大型應用程式的同時探索他們的新電腦。如需更多資訊,請參閱macOS上線。其他注意事項包括以下幾點:
如果使用Jamf Pro,可將
NotifyLogStyle密鑰值設為jamf,以自動將Jamf Pro政策記錄檔作為狀態更新向使用者顯示。在腳本中使用自訂政策觸發程序來執行基礎的電腦設定管理任務,例如安裝基礎軟體。
由於「通知」畫面在電腦設定期間應該只顯示一次,因此使用以下命令結束腳本以停用已使用的「通知」畫面:
/usr/local/bin/authchanger -reset -JamfConnect
若要下載範例腳本作為起點,請參閱Jamf的 jamf/jamfconnect(GitHub)。
進階選項
上線腳本和政策可以透過多種不同的方式執行。如果您的上線程序將超過Jamf Pro的標準15分鐘重複報到時間,您可以考慮在上線腳本過程中停止重複報到。如果政策批次超過15分鐘計時器,重複報到可能會中斷自訂觸發程序所觸發的政策。
若要停用,請執行以下命令:
# Wait for enrollment then temporarily disable check-in
# Once Jamf Pro enrollment is complete, a launch daemon will run that automatically
# does re-occurring check-in every 15 minutes (or as set in Jamf Pro settings).
# Set the location of the re-occurring check-in launch daemon file
ld="/Library/LaunchDaemons/com.jamfsoftware.task.1.plist"
# Pause until the file exists which means enrollment is complete
while [ ! -f "$ld" ]; do
sleep 0.1;
done
# Boot out the launch daemon to stop it from running
# Remember to run a policy to turn this back on later!
/bin/launchctl bootout system "$ld"要稍後重新啟用報到:
# Set the location of the launch daemon file
ld="/Library/LaunchDaemons/com.jamfsoftware.task.1.plist"
# Re-enable the launch daemon to continue re-occurring check-in
/bin/launchctl bootstrap system "$ld"