From 3e6e8a8f23415b3b68447a133b83c9c0db3eafd7 Mon Sep 17 00:00:00 2001 From: wattsy74 <49881777+wattsy74@users.noreply.github.com> Date: Mon, 27 Sep 2021 13:27:57 +0100 Subject: [PATCH] Create lock-device.sh --- lock-device.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lock-device.sh diff --git a/lock-device.sh b/lock-device.sh new file mode 100644 index 0000000..5371f38 --- /dev/null +++ b/lock-device.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +jssUser=$4 +jssPass=$5 +jssHost=$6 +passcode=$7 + +id=$(jamf recon | grep '' | xmllint --xpath xmllint --xpath '/computer_id/text()' -) +/usr/bin/curl -su "${jssUser}:${jssPass}" "https://${jssHost}/JSSResource/computercommands/command/DeviceLock/passcode/${passcode}/id/${id}" -H "Content-Type: application/xml" -X POST