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 | |
appName="$4" | |
# Kill the app, if running | |
echo "Killing $appName app process" | |
killall "$appName" | |
exit 0 |
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 | |
# determine if current user has opted-in for Apple Intelligence on macOS 15.1 or later | |
# ekw 2024-08-07 | |
# built at time of macOS 15.1 beta 1 | |
# disclaimer: forward-looking statement… this may not work forever, and likely won't be needed long-term as | |
# MDM vendors prepare for macOS 15 support. | |
# this EA for jamf pro is provided as-is with no warranty (express or implied). please test! | |
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 | |
########## | |
# 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
#!/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
curl -X POST -H 'Content-type: application/json' --data '{"username": "Clever Name Here","icon_emoji": ":fancy_cat:","text": "Hello, this is your daily reminder that a thing just happened!","channel": "XXXXxXXXx"}' https://hooks.slack.com/services/full/URL/of/configured/incomingwebhook |
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: management-action-by-policy.sh | |
# Description: This script is designed to run with policies to use | |
# Management Action.app to send a push notification to | |
# a managed Mac. | |
# Use: 1- Add script to Jamf Pro server, and optionally add | |
# parameter lables that match the parameters below. |
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
function checkJPSConnection { | |
n=0 | |
until [[ $n -ge 12 ]]; do | |
checkAvailablity=$(${jamfBinary} checkJSSConnection) | |
# Function exitStatus | |
if [[ $checkAvailablity == *"${jps}"* ]]; then | |
echo "${jps} is available, continuing..." | |
break | |
else | |
echo "${jps} is unavailable at this time. Suspending until next interval..." |
NewerOlder