Created
July 31, 2023 18:49
-
-
Save smashism/4a60d1bbe1f38ee1cb0c5dd724108b71 to your computer and use it in GitHub Desktop.
Automate marking computers as unmanaged with the Jamf Pro Classic API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
deviceIDs=( | |
# put jssIDs here for computers to remove | |
# ex. 12345678 | |
0000 | |
) | |
for id in "${deviceIDs[@]}"; do | |
/usr/bin/curl -sku "apiuser":"apipass" -X PUT -H "content-type: text/xml" "https://yourjamfpro.jamfcloud.com/JSSResource/computers/id/{$id}" -d "<computer><general><remote_management><managed>false</managed></remote_management></general></computer>" | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment