Has anyone successfully deployed the following script to add a computer to a static group. Goal: Have buttons in Self Service to add a computer to a static group.
$4 is the group ID.
1#!/bin/sh23#API login info4apiuser="apiaccount"5apipass='apiaccountpassword'6jamfProURL="https://myjamfinstance.jamfcloud.com"78ComputerName=$(hostname)910#Group to update11GroupID="$4"12apiURL="JSSResource/computergroups/id/${GroupID}"1314#XML header stuff15xmlHeader="<?xml version="1.0" encoding="UTF-8" standalone="no"?>"1617apiData="<computer_group><id>${GroupID}</id><name>Whatever the GroupName Is</name><computer_additions><computer><name>$ComputerName</name></computer></computer_additions></computer_group>"1819curl -sSkiu ${apiuser}:${apipass} "${jamfProURL}/${apiURL}" 20 -H "Content-Type: text/xml" 21 -d "${xmlHeader}${apiData}" 22 -X PUT > /dev/null
