Skip to main content
Jamf Nation, hosted by Jamf, is a dynamic and knowledgeable community of Apple-focused IT admins and Jamf Pro users. Join us in person, in October, for the annual Jamf Nation User Conference (JNUC) to discover new and better ways to manage Apple devices.

jssID List to Static Group using the API Script

Synopsis

This script takes a list of jssIDs and overwrites an existing Static Group leveraging the API with those systems.

Description

# 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

Download

Preview

Generating Preview...