This file contains hidden or 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 | |
| # server connection information | |
| URL="https://talkingmoose.jamfcloud.com" | |
| username="API-Editor" | |
| password="P@55w0rd" | |
| # provide the Jamf Pro ID of the PreStage Enrollment; look in the URL when viewing the PreStage Enrollment | |
| prestageID="1" |
This file contains hidden or 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 | |
| # there's probably a better way to use lsappinfo to get the list of apps, but it's not well documented | |
| appsList=$( /usr/bin/lsappinfo list | /usr/bin/grep -B 4 Foreground | /usr/bin/awk -F '\\) "|" ASN' 'NF > 1 { print $2 }' ) | |
| # kill each app by name except Finder | |
| while IFS= read anApp | |
| do | |
| if [ "$anApp" != "Finder" ]; then | |
| /usr/bin/pkill "$anApp" |
This file contains hidden or 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 | |
| # Based on the script by @nicktong found at https://www.jamf.com/jamf-nation/discussions/32400/battery-recall-for-15-mid-2015-mbp | |
| ## Jamf Pro URL and credentials | |
| URL="https://talkingmoose.jamfcloud.com" | |
| username="api-auditor" | |
| password="P@55w0rd" |
This file contains hidden or 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 | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticallyInstallMacOSUpdates -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool TRUE | |
| /usr/bin/defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool TRUE | |
| exit 0 |
This file contains hidden or 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 | |
| <<ABOUT_THIS_SCRIPT | |
| ----------------------------------------------------------------------- | |
| Written by:William Smith | |
| Professional Services Engineer | |
| Jamf | |
| bill@talkingmoose.net | |
| https://gist.github.com/talkingmoose/520c79d8d0f9bc49c9e07ca43122225c |
This file contains hidden or 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 | |
| # server connection information | |
| URL="https://talkingmoose.jamfcloud.com" | |
| userName="api-editor" | |
| password="P@55w0rd" | |
| # path to list of serial numbers | |
| deviceList="/path/to/file.txt" |
This file contains hidden or 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 | |
| # server connection information | |
| URL="https://jamfpro.talkingmoose.net:8443" | |
| userName="api-editor" | |
| password="P@55w0rd" | |
| # path to list of serial numbers | |
| deviceList="/path/to/file.txt" |
This file contains hidden or 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 | |
| # server connection information | |
| URL="https://jamfpro.talkingmoose.net:8443" | |
| userName="api-editor" | |
| password="P@55w0rd" | |
| # Lost Mode messaging | |
| lostModeMsg="This iPad has been reported lost. Please help us return it." | |
| lostModePhone="(612) 555-1234" |
This file contains hidden or 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 | |
| # Displays a dialog to the end user with a five minute countdown. If the countdown reaches 0:00 or the user clicks the button, the dialog disappears allowing the remainder of the workflow to proceed. | |
| /Library/Application\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper \ | |
| -windowType utility \ | |
| -lockHUD \ | |
| -title "macOS Mojave Upgrade" \ | |
| -heading "ALERT: Your upgrade is about to start!" \ | |
| -description "Your Mac will automatically upgrade its operating system in five minutes and can no longer be deferred. Close and save your work now. |
This file contains hidden or 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 | |
| # set the keychain item attributes | |
| account=$( uuidgen ) | |
| accountName="serveradmin" # aka label | |
| accountPassword="MySecretPassword" | |
| applicationPath="/Applications/Microsoft Remote Desktop.app" | |
| friendlyName="Server Administrator" | |
| service="com.microsoft.rdc.macos" |