Hi,
I need to delete all classes in Jamf pro imported by ASM. Does anybody have a working sh. script?
I have used this one below but getting in terminal this error "-:1: parser error : Document is empty"
#!/bin/bash
jssUser="xxx"
jssPass="xxx"
jssURL="https://xxxx:8443"
echo "Downloading list of class IDs..."
ids+=($(curl -X GET -s -k -u "$jssUser:$jssPass" "$jssURL/JSSResource/classes" | xmllint --format - | awk -F'>|<' '/<id>/{print $3}' | sort -n))
for n in "${ids[@]}"; do
curl -kvu $jssUser:$jssPass ${jssURL}JSSResource/classes/id/$n -X DELETE
done
