Hi JamFm,
As far as I am aware, there is no way to do this currently within Jamf School but it is a feature that the Jamf team are looking into. It was recently put into a feature request on Jamf Nation.
I would advise you upvote this as this allows the Jamf team to see that this is a wanted feature.
https://ideas.jamf.com/ideas/JN-I-25219
Many Thanks,
Matt
Hi JamFm,
As far as I am aware, there is no way to do this currently within Jamf School but it is a feature that the Jamf team are looking into. It was recently put into a feature request on Jamf Nation.
I would advise you upvote this as this allows the Jamf team to see that this is a wanted feature.
https://ideas.jamf.com/ideas/JN-I-25219
Many Thanks,
Matt
Thanks Matt 👍
In the past, I have used this script to do what you describe via jamf pro, hope this helps.
------------
#!/bin/bash
# server connection information
URL="$JSSFQDN"
userName="$apiaccount"
password="$apipass"
# Lost Mode messaging
lostModeMsg="$messagehere"
lostModePhone="$phonehere"
lostModeFootnote="$footnote"
# path to list of serial numbers
deviceList="$serials.txt"
xpath() {
# the xpath tool changes in Big Sur
if [[ $(sw_vers -buildVersion) > "20A" ]]; then
/usr/bin/xpath -e "$@"
else
/usr/bin/xpath "$@"
fi
}
mobileDeviceList=$( /bin/cat "$deviceList" )
# send Lost Mode command to every device in mobile device list
for aDevice in ${mobileDeviceList[@]}
do
# get Jamf Pro ID for device
deviceID=$( /usr/bin/curl -s "$URL/JSSResource/mobiledevices/serialnumber/$aDevice" \\
--user "$userName:$password" \\
--header "Accept: text/xml" \\
--request GET | \\
xpath '/mobile_device/general/id/text()' )
# API submission command
xmlData="<mobile_device_command>
<general>
<command>EnableLostMode</command>
<lost_mode_message>$lostModeMsg</lost_mode_message>
<lost_mode_phone>$lostModePhone</lost_mode_phone>
<lost_mode_footnote>$lostModeFootnote</lost_mode_footnote>
</general>
<mobile_devices>
<mobile_device>
<id>$deviceID</id>
</mobile_device>
</mobile_devices>
</mobile_device_command>"
# flattened XML
flatXML=$( /usr/bin/xmllint --noblanks - <<< "$xmlData" )
/usr/bin/curl -s "$URL/JSSResource/mobiledevicecommands/command/EnableLostMode"\\
--user "$userName":"$password" \\
--header "Content-Type: text/xml" \\
--request POST \\
--data "$flatXML"
echo "Sending Enable Lost Mode Command to Device ID: $deviceID..."
done
exit 0