Skip to content

Instantly share code, notes, and snippets.

View spokanemac's full-sized avatar
📡
Open to remote work.

JD spokanemac

📡
Open to remote work.
View GitHub Profile
#!/bin/bash
# v 0.9, released January 28th, 2017
# This script is designed to evaluate a current ManagedInstalls.plist file, then make a change to the specified key. The script will then log a success message to a Slack webhook.
# Original Script authored by Tom Bridge, with advice from Richard Purves, Ben Toms and others.
# You will need to supply your own preference keys to check, as well as preferred values.
# Make sure to get your own Slack Web Hook URL from the Customizations and Apps section of your Slack Control Panel.
# Copyright 2017 Tom Bridge, Technolutionary LLC
@t-lark
t-lark / unmanage_jamf_devices.py
Created October 10, 2023 00:27
Un-manage devices in Jamf via Classic API
#!/opt/snowflake/bin/python3
"""
In Jamf Pro version 10.49 and higher, Jamf has removed the ability to mass edit management account settings
from a saved search results page via mass actions. This means that you either have to un-manage old devices by manually
un-managing them one by one in their device record, or write some sort of API script. You can also technically delete
the device record if that is an acceptable use case at your Org.
This script will take the JSS ID from a smart group, grab the ID of each device and store it in a Python list. Then it will
iterate through that list and send Classic API commands to remove the management account thus freeing up the license.