Re-enrolling Computers

kadams
Contributor

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.

4 REPLIES 4

patgmac
Contributor III

No, but take a look at the "Re-enrollment" settings in your JPS settings.

hkabik
Valued Contributor

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.

sdagley
Esteemed Contributor II

@kadams To amplify what @patgmac was saying - in the Settings page for your Jamf Pro Server, select the Re-Enrollment icon under Global Management. There you will find settings for what happens when a device is re-enrolled, including the ability to have policy logs and management history cleared.

Hugonaut
Valued Contributor II

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
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month