Mac Admins Toolkit is where I now keep the scripts and small utilities I write for Apple device management. Some are MDM-agnostic and run on any Mac. Others are built for Jamf Pro and use its API. Each tool sits in its own folder with its own README.
This post is the overview. I am writing separate posts for the tools that need more explanation, and I will keep adding tools to the repository.
What is in it today
| Tool | What it does | Where it runs |
|---|---|---|
| Jamf-Pro-ScopeMap-API-Role | Creates the read-only Jamf Pro API Role that ScopeMap needs | Admin Mac |
| Jamf-Pro-Delete-Devices | Deletes computer or mobile device records by serial number | Admin Mac |
| Jamf-Pro-Delete-All-Computer-Groups | Deletes all smart and/or static computer groups, with a backup first and a restore script | Admin Mac |
| Jamf-Pro-Delete-All-Advanced-Computer-Searches | Deletes all advanced computer searches, with a backup first and a restore script | Admin Mac |
| Jamf-Pro-Delete-All-macOS-Config-Profiles | Deletes all macOS configuration profiles, with a backup first and a restore script | Admin Mac |
| Jamf-Pro-Managed-Status | Sets the managed status of computers by serial number | Admin Mac |
| JAMF-macOS-Profile-Deprecation-Audit | Read-only audit of configuration profiles for macOS 27 deprecations | Admin Mac |
| Jamf-Pro-Recovery-Lock-API | Sets or clears Recovery Lock through the Jamf Pro API | Managed Mac, Jamf policy |
| Jamf-Pro-Recovery-Lock-Clear-and-Erase | Self Service script that clears Recovery Lock, then erases an Apple silicon Mac chosen by serial number | Managed Mac, Jamf policy |
| Jamf-Pro-Slack-Notifications | Sends a Slack message from a Jamf policy | Managed Mac, Jamf policy |
| TCC-Audit | Read-only audit of TCC privacy records | Mac |
| Check-Dock-Status | Waits until the Dock is running, then runs your commands | Mac |
| Set-Computer-Name | Sets the Mac’s name to model and serial number, or serial number only | Mac |
| Jamf-Pro-EA-Mac-Admins-Python-Version | Extension attribute that reports the Mac Admins Python version or “Not Installed” | Mac, Jamf EA |
The three “delete all” tools take an optional exclude list.
The scripts are developed with macOS 15, macOS 26 and macOS 27 in mind. That is a development target. It does not mean every script has been tested on every macOS version, Mac model or MDM configuration.
Posts about individual tools
- Clear Recovery Lock and erase a Mac by serial number
- Create the read-only API role for ScopeMap
- Send Slack messages from a Jamf Pro policy
- Audit Jamf Pro profiles for macOS 27 deprecations
- Audit TCC privacy records on macOS 27
Shared settings for the Jamf Pro API tools
The tools marked Admin Mac run from a terminal, not from a Jamf policy. They share one way of reading settings, so learning it once covers all of them.
Values are read in this order, highest priority first:
- An environment variable
- The script default (the
SCRIPT_*variables at the top of the script) - An optional plist,
com.karthikmac.macadminstoolkit - A prompt for anything still missing
The client ID, client secret and passwords are typed with no echo. A non-interactive run stops with an error instead of prompting.
Guard rails
- The environment is never chosen silently. You pick
prodordevwithJAMF_ENV, the script default, or a prompt. - Production needs a typed confirmation. Choosing
prodshows the server, the account and what will happen, and you must typePRODto continue. This applies to read-only tools too. - The URL is checked before authenticating. The script stops if the URL belongs to the other environment in the plist, or differs from the selected environment’s URL.
- Tools that change Jamf Pro start as a dry run.
DRY_RUN=yesonly reports. A real run needsDRY_RUN=no, andDRY_RUNis read only from the environment, never from the plist. - Output never shows values. The first lines print the script name and version, the environment, and where each setting came from.
The optional plist
The plist lives at ~/Library/Preferences/com.karthikmac.macadminstoolkit.plist and has separate Dev and
Prod keys:
# Dev: URL and API Client
defaults write com.karthikmac.macadminstoolkit DevServerURL -string "https://dev.jamfcloud.com"
defaults write com.karthikmac.macadminstoolkit DevAPIClientID -string "your-api-client-id"
defaults write com.karthikmac.macadminstoolkit DevAPIClientSecret -string "your-api-client-secret"
# Prod: URL and client ID only; leave the secret out so prod prompts for it
defaults write com.karthikmac.macadminstoolkit ProdServerURL -string "https://prod.jamfcloud.com"
defaults write com.karthikmac.macadminstoolkit ProdAPIClientID -string "your-prod-api-client-id"
# Keep the file private
chmod 600 ~/Library/Preferences/com.karthikmac.macadminstoolkit.plist
The Jamf policy tools are configured differently. Jamf-Pro-Recovery-Lock-API uses the same plist and keys
with a few unattended differences. Jamf-Pro-Slack-Notifications and
Jamf-Pro-Recovery-Lock-Clear-and-Erase use Jamf policy parameters instead.
Before you run anything
Please treat these scripts the way you would treat any script from the internet:
- Read the script and its README.
- Check the variables, parameters, permissions and dependencies it needs.
- Test on a non-production Mac, and against a non-production Jamf Pro tenant where one is involved.
- Confirm the result is what you expected.
- Only then use it in production.
Never put credentials, API tokens or client secrets directly in a script. If one is committed or pushed by accident, treat it as exposed and rotate it.
Get it
git clone https://github.com/karthikeyan-mac/Mac-Admins-Toolkit.git
cd Mac-Admins-Toolkit
The repository is under the MIT licence. If something does not work as expected, please open an issue with the script name, macOS version, MDM platform and what you saw.