Jamf Pro – Policy To Reinstall The Jamf Management Framework

If you need to redeploy the Jamf management framework to client computers, the official method is to write or use a script that calls the Jamf API (see Redeploying the Jamf Management Framework Using the Jamf Pro API). There are two downsides to this:

  1. You have to write, find, or adapt a script to call the Jamf API.
  2. Redeploying the Jamf management framework like this also re-runs all policies like a new enrollment.

I’ve found that creating a Jamf policy to retrieve the Jamf binary, create a client configuration file, and run the “jamf enroll -prompt” command has several benefits:

  1. A policy can be scoped and re-scoped easily (instead of using a script to parse API query results).
  2. Previously executed policies do not re-run.
  3. Some computers may be too broken to retrieve the pending management command created by the API (the command just sits in the pending queue). This policy will work even on those broken computers (so long as they can still run policies provided by Jamf).
  4. You can also run this script from the command line (using sudo to execute the script as root).

Continue reading


Jamf Pro & WHD – Make Clients Admin of Their Asset

If you use Jamf Pro and SolarWinds Web Help Desk (WHD), you may be interested in using this Jamf policy script to make WHD asset clients admin of their own assets on login.

Jamf and WHD Requirements

  • Assets in WHD must have accurate serial numbers entered. The script uses the computer serial number to locate the asset in WHD, so WHD assets must have serial numbers.
  • Assets in WHD must have one or more clients assigned to them. Clients assigned to the asset will be added to the ‘admin’ group for that asset on login.
  • The Perl script uses the JSON module, which Apple included in MacOS v11. If the computer uses an older MacOS version, the script will exit with an error. The script uses a BEGIN{} section to handle importing the JSON decode_json() function and exit gracefully if the JSON module is missing.

Continue reading