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.
You could create a re-enrollment scirpt that includes an api script to remove the machine from Jamf Pro before re-enrollment.
/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.
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