Wipe Multiple Macbooks

bishopz
New Contributor III

Hello all!

We are doing a macbook refresh this summer and I am trying to figure out a way to wipe our current computers for the company buying them. I've done this before by utilizing the --eraseinstall function of the OS installers.

However, the company we are using this time just wants them wiped, no OS needed. So essentially, the function of the Wipe computer command in Jamf would be perfect and save a lot of time from having to put an OS installer on the macbooks and wait for the erase install to finish. Unfortunately, this command is not available as a mass action. I'd prefer to not have to go into each computer in Jamf and do the Wipe command one at a time.

I'd love to be able to avoid the eraseinstall method if possible. Is there another way to do the computer wipe as a mass action? Anyone have a different method of cleanly wiping 100's of computers quickly? Thanks in advance.

1 ACCEPTED SOLUTION

DBrowning
Valued Contributor II

Maybe using something like this in a script scoped to the group of computers.

    jamfProCompID=$( /usr/bin/curl -s -u ${apiUsername}:${apiPassword} ${jamfProURL}/JSSResource/computers/serialnumber/${computerSerialNumber}/subset/general | xpath "/computer/general/id/text()" )

    /usr/bin/curl -s -X POST -H "Content-Type: text/xml" -u ${apiUsername}:${apiPassword} ${jamfProURL}/JSSResource/computercommands/command/EraseDevice/passcode/123456/id/${jamfProCompID}

View solution in original post

2 REPLIES 2

DBrowning
Valued Contributor II

Maybe using something like this in a script scoped to the group of computers.

    jamfProCompID=$( /usr/bin/curl -s -u ${apiUsername}:${apiPassword} ${jamfProURL}/JSSResource/computers/serialnumber/${computerSerialNumber}/subset/general | xpath "/computer/general/id/text()" )

    /usr/bin/curl -s -X POST -H "Content-Type: text/xml" -u ${apiUsername}:${apiPassword} ${jamfProURL}/JSSResource/computercommands/command/EraseDevice/passcode/123456/id/${jamfProCompID}

bishopz
New Contributor III

@DBrowning

My man! Thanks! I really need to use the API more, that is handy as heck. Tested it out on one and worked great, shouldn't be too hard to apply to a group. Appreciate your help.