Automating computer lock or wipe


It is possible in Apple Business Manager to define multiple entries for Jamf so that one could be for normal Macs and one for Stolen/Lost Macs.

These different MDM entries in ABM would then link to different Automated Device Enrolment entries in Jamf. I have these set so the lost/stolen entry puts computers in a special 'site' in Jamf.

In theory this information could then be used to trigger the remote wiping or locking of said computers. Whilst it would be much preferred if Jamf then allowed a policy to be scoped to this and issue said wipe or lock command automatically (which currently is not possible) I have seen mention of writing a script to use the Jamf API to do this.

The purpose being to lock or wipe a stolen or lost computer should the person who stole/finds it tries to reuse it after the DEP enrolment.

Does any one have an example script to do this?