infamy1
4/6/2017 - 6:19 PM

clearUserLocationInfoAPI.sh

#!/bin/bash
jssUrl=""
serial=$(ioreg -l | grep IOPlatformSerialNumber | awk '{print $4}' | tr -d "\"")

    curl -k -s -H "Content-type: application/xml" -u jssadmin:jamf1234 -d "<computer>
	<location>
		<username/>
		<real_name/>
		<email_address/>
		<position/>
		<phone/>
		<department/>
		<building/>
		<room/>
	</location>
</computer>" $jssUrl/JSSResource/computers/id/$serial -X PUT;