This script takes a list of jssIDs and overwrites an existing Static Group leveraging the API with those systems.
# Variables used by this script JSS_ID_PATH="" # Text file with one JSS ID per Line JSS_API_INFO_DIR="/tmp/jss_api_tmp" # Directory where working files for each JSS ID will be stored JSS_XML_INPUT="/tmp/JSS_XML_INPUT.xml" # XML Output to be uploaed to the JSS Computer Groups API STATIC_GROUP_ID="" # Static Group ID: This can be found in the URL when you click edit on a Static Group STATIC_GROUP_NAME="" # This is the name of the Static Group you want to overwrite # Variables used by Casper USERNAME="" #Username of user with API Computer read GET and Computer Group PUT access PASSWORD="" #Password of user with API Computer read GET and Computer Group PUT access JSS_URL='https://jss.jamf.com:8443' # JSS URL of the server you want to run API calls against