Skip to main content
Question

Self Service one click restore 10.13.6

  • September 11, 2018
  • 2 replies
  • 24 views

KyleEricson
Forum|alt.badge.img+17

With 10.13.6 installer there is a way to erase a hard drive and re-install the OS. Can I have in this policy a remove this device record from JAMF so I can use this to decom Macs?

2 replies

Forum|alt.badge.img+7
  • New Contributor
  • September 11, 2018

With an API call you certainly could. You might try something like this:

#!/bin/sh

jssURL="https://jss.address.here:8443"
apiUser="username"
apiPass="password"

#Get the serial number
SERIAL_NUMBER=$(system_profiler SPHardwareDataType | grep 'Serial Number (system)' | awk '{print $NF}')

#DELETE the Computer
curl -ks -H "Content-Type: text/xml" 
-u "$apiUser":"$apiPass" "$jssURL"/computers/serialnumber/$SERIAL_NUMBER 
-X DELETE

Something like this should work, but I might consider using the API to move these to a decommissioned site then deleting from there.


Forum|alt.badge.img+16
  • Honored Contributor
  • September 11, 2018

This should help

https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/

C