Scripts for Jamf Pro that rename macOS computers to "User's Model Name" (e.g. Alex Davenport's MacBook Pro).
Uses the last logged-in local user to determine the name. Best suited for environments without LDAP/SSO integration in Jamf.
No Jamf script parameters are required.
Looks up the assigned user via the Jamf Pro API (OAuth2 client credentials). Use this when your Jamf Pro instance has user–computer associations via LDAP, SSO, or manual assignment.
| Parameter | Value |
|---|---|
$4 |
API Client ID |
$5 |
API Client Secret |
$6 |
Jamf Pro URL (e.g. https://yourorg.jamfcloud.com) |
- In Jamf Pro, go to Settings > System > API Roles and Clients.
- Create an API Role with the permission: Read Computers.
- Create an API Client, assign it the role above, and note the Client ID and Client Secret.
- Enter those values in the script's parameter fields in your Jamf Pro policy.
- macOS (uses
scutil,system_profiler,dscl) - Jamf Pro agent installed (
jamf reconis called at the end of each script) - Scripts must run as root (Jamf policies run as root by default)