It seems I'm always typing this first part, but until i feel comfortable here goes.
I'm a new Jamf admin and we have Jamf Pro and soon will have Jamf connect. with normal turnover, i am trying to find the best way to repurpose the macs we have, and I'd to to have the following 2 options available.
1: A user leaves and the mac will go to another department, meaning i want all of the users data gone, as well as the apps installed, but I want to keep the current MacOS
2: A user leaves, but the machine will stay in the current department and I want to keep the apps installed, but get rid of the users data.
Is there a way to accomplish these tasks through Jamf?
For the first one, you would probably look to erase and re-install the Mac. One method would be to deploy the "Install macOS.app" and then use
startosinstall to kick off an erase and install.
For the second point, as you would need to determine the username programatically, you would probably use
sysadminctl in a script, triggered via a policy.
Above post definitely works.
I usually end up using a USB and delete the drive from the Disk Utility, then installing fresh.
Smart groups are your friend. Unless you are using some old piece of software that HAS to stay on as is, reinstalling programs via JAMF is painless. If you are changing departments, change the smart group(s) they are part of.