Posted on 12-14-2018 12:22 PM
Whenever I re-enroll a computer, I remove it from Jamf. Is there a way to get Jamf to auto remove the computer? If i dont remove the computer, it wont receive new profiles and policies. Jamf thinks its the same computer and wont make any changes. I re-enroll computers often here where I work. People end up departing, or requesting a new computer. I have to repurpose many old or previously used devices. I would like to find a way to get Jamf to delete the old computer and re enroll it.
Posted on 12-14-2018 12:30 PM
No, but take a look at the "Re-enrollment" settings in your JPS settings.
Posted on 12-14-2018 12:40 PM
You could create a re-enrollment scirpt that includes an api script to remove the machine from Jamf Pro before re-enrollment.
Something like:
/usr/bin/curl -X DELETE -u $apiUser:$apiPass $apiURL/JSSResource/computers/udid/$udid
You can even do this via policy, as once the policy triggers the script will continue until complete even if the computer is removed from the Jamf Pro server along the way.
Posted on 12-14-2018 06:55 PM
Posted on 12-15-2018 11:48 AM
A few questions about the bigger picture so I can better answer the question.
Are these computers configured for DEP? Are you Imaging these or Provisioning?
@hkabiks api call is a great way to get rid of the computer, then upon re enrollment, you can always run a flush policy history, set it as the first policy to run and then any 1 time policies will be called again
#!/bin/sh
sudo jamf flushPolicyHistory