This file contains 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 | |
########## | |
# title: unmanage-devices-modern-auth.sh | |
# author: dr. k | @smashism on github | |
# date: 2024-03-28 | |
# note: include jssIDs where specified, other server/cred details will | |
# prompt when run via terminal.app | |
# disclaimer: provided as-is with no warranty (express or implied). please test! | |
# |
This file contains 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 | |
########## | |
# title: unmanage-computers-modern-auth.sh | |
# author: dr. k | @smashism on github | |
# date: 2024-03-28 | |
# note: include jssIDs where specified, other server/cred details will | |
# prompt when run via terminal.app | |
# disclaimer: provided as-is with no warranty (express or implied). please test! | |
# |
This file contains 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 mobile devices 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/mobiledevices/id/{$id}" -d "<mobile_device><general><managed>false</managed></general></mobile_device>" |
This file contains 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>" |
This file contains 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
randomsn() { | |
managed_python3 -c "import string; from random import randint, sample; print('VM' + ''.join(sample((string.ascii_lowercase + string.digits),10)))" | |
} |
This file contains 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 | |
# Largely cobbled together from github.com/homebysix/jss-filevault-reissue/ | |
# Thank you kindly to github.com/rderewianko for the idea | |
# Last modified 2016-11-28 | |
# | |
# This script uses AppleScript to prompt for a hostname, then sets it on the computer. | |
# Recommended: a recon at the end of the QuickAdd enrollment workflow to make sure the JSS | |
# shows the correct username. | |
# |
This file contains 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 | |
# adapted by github.com/smashism | |
# created 2015-03-12 | |
# updated 2016-11-07 - changed from cocoaDialog to jamfHelper | |
# lets user get browser versions for updating | |
# | |
# provided AS IS with no guarantee or warranty | |
# "You want the rest of the 'champaggin'?" "No… and it's pronounced 'cham-pain.'" |
This file contains 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 | |
############################################################################### | |
################################## VARIABLES ################################## | |
############################################################################### | |
dockutil=$(which dockutil) | |
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' ) |
This file contains 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 | |
### | |
# | |
# Name: set-ea-value.sh | |
# Description: This script is designed to leverage the API to manually | |
# update the value of an EA on a computer record. Handy | |
# for situations where you don't need information actively | |
# pulled from a Mac but still want to set adhoc when needed. | |
# Values for jamfserver, API credentials, EA ID, EA Name, |
This file contains 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/sh | |
# | |
# adapted by github.com/smashism | |
# created 2015-03-12 | |
# last updated 2016-11-07 - change from cocoaDialog to jamfHelper | |
# uses jamfHelper to display computer information to user | |
# helpful for troubleshooting if user can't find info themselves | |
# | |
# offered AS IS with no warranty or guarantee |
NewerOlder