setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
246 stars 54 forks source link

Switch "policy -trigger" to "policy -event" #38

Closed delize closed 1 year ago

delize commented 1 year ago

Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.

Is your feature request related to a problem? Please describe. Future proof event/trigger call, as currently Jamf states that the

# sudo jamf help policy

Usage:   jamf policy [-event <event>] [-username <username>] [-id <policy_id>] [-forceNoRecon]

    -event      The event or trigger that the policy is associated with in the JSS. Historical synonyms include –trigger and –action.
                Note: Running policy without an event will default to the scheduled event.
                Other events include: login, logout, startup, networkStateChange, enrollmentComplete, along with custom events.

    -username       The username to check for policies for.

    -id         The ID of the policy to be executed. Used by Casper Remote and Self Service.

    -forceNoRecon       Prevents computers from submitting inventory update when a policy is configured to update inventory.

It would be good to update the script to start to use -event, in the case that Jamf decides to get rid of the historical use cases of the flag.

dan-snelson commented 1 year ago

Thanks, @delize

dan-snelson commented 1 year ago

@delize: This should be addressed in 1.10.0-rc26.

dan-snelson commented 1 year ago

Thanks, @delize!