Jamf to Jamf Device Migration Script
- Katelyn Russell
There are two scripts available for migrating Macs from another Jamf instance to the campus Jamf instances:
utexas-jamf-migrate-to-user-enrolled
UT gitub (eid required): utexas-jamf-migrate-to-user-enrolled
Migrates Macs to campus Jamf as user-enrolled
- Add the script to the source Jamf instance (copy and paste from mdm.utexas.edu or use Jamf Migrator)
- Create a policy to run the script.
- Add the no-login invitation ID (last part of the URL, or listed in Enrollment Invitations) as a parameter.
- To migrate to the Sandbox instance instead of Prod, add utexassandbox.jamfcloud.com as a parameter (mdm.utexas.edu is the default).
- Note you must use an invitation ID from the Sandbox in that case
- Optionally, add parameters for the source Jamf server, api username, and api password. This will allow the script to use the API to remove the MDM Profile, if the Mac was prestage-enrolled.
- the API account must have permissions to permissions to Create/Read/Update Computers, Flush MDM Commands, and send the Computer Unmanage command
- if you grant EPM access to your instance, we can migrate an account with those privileges for you
- Set the scope to the Macs you wish to migrate
- Add to Self Service or trigger at check-in as desired.
The console user must approve the new MDM Profile. When the script runs, first the user is prompted with a popup dialog:
Then they are granted admin rights temporarily, and Profiles will open.
The user clicks Install and can enter their normal username & password to approve the profile.
utexas-jamf-migrate-to-prestage-enrolled
UT github (eid required): utexas-jamf-migrate-to-prestage-enrolled
Migrates Macs to campus Jamf as prestage-enrolled
- Add the script to the source Jamf instance (copy and paste from mdm.utexas.edu or use Jamf Migrator)
- Create a policy to run the script.
- Set the scope to the Macs you wish to migrate
- Add parameters for your source Jamf server, api username, and api password
- the API account must have permissions to Create/Read/Update Computers, Flush MDM Commands, and send the Computer Unmanage command
- if you grant EPM access to your instance, we can migrate an account with those privileges for you
- (optional but strongly recommended) Add parameters for the destination Jamf server, api username, and api password
- this is for checking that the computer does not exist but is assigned to a PreStage
- there is an "epm-api-migration" account in campus Jamf that can be used - it has read-only access to computers and prestages only
- Add to Self Service or trigger at check-in as desired
REQUIRED: CHANGE ASSIGNMENT IN APPLE SCHOOL MANAGER TO NEW MDM SERVER FIRST
The console user must approve the new MDM Profile. When the script runs, if the destination account is provided, the script will check that the Mac does not exist in the destination and is assigned
to a PreStage Enrollment. It will abort if neither is the case (migration will fail if those 2 conditions are not met, which is why the destination API account is strongly recommended).
If it continues, the user is prompted with a dialog:
Then the script uses the API to issue the MDM remove command. It will wait for the profile to be removed before proceeding.
Then it will issue the "profiles renew -type enrollment" command and wait for the new MDM Profile to be installed. The user is granted admin rights temporarily to approve the new profile.
The user must look for the "Device Enrollment" notification and click on it to install the new profile. If it does not show up they should click on the clock/notification center.
Once the profile is approved the Mac will finish enrolling in Jamf.
Once the MDM Profile is installed, the script will check the MDM server and if it is the same as the original, exit with the error "Migration failed: New MDM Profile is the same as the original" in the log.
EPM is available to IT Support Organizations (ITSOs) with any endpoint management questions. If you have a question about a specific endpoint client, please reach out to your local endpoint client support organization.
Welcome to the University Wiki Service! Please use your IID (yourEID@eid.utexas.edu) when prompted for your email address during login or click here to enter your EID. If you are experiencing any issues loading content on pages, please try these steps to clear your browser cache.