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/sh | |
| #################################################### | |
| ## Use the legacy binary if running on < 10.7 | |
| #################################################### | |
| os_version=$(system_profiler SPSoftwareDataType -xml | grep -A 2 'os_version</key>' | grep -o 'OS X [0-9]\+.[0-9]\+' | grep -o '[0-9]\+.[0-9]\+') | |
| major_version=$(echo $os_version | grep -o '[0-9]\+\.' | grep -o '[0-9]\+') | |
| minor_version=$(echo $os_version | grep -o '\.[0-9]\+' | grep -o '[0-9]\+') | |
| /usr/bin/tar -xf /private/tmp/JAMFQuickAdd/Binaries.tar.gz -C /private/tmp/JAMFQuickAdd | |
| /bin/mkdir -p /usr/local/bin |
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 | |
| # 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 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/sh | |
| # gets user and location data to populate computer record | |
| # can run on policy at any time | |
| # by emily | |
| # last updated 2016-12-02 | |
| # Get the logged in users username | |
| loggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");') |
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 | |
| ### | |
| # | |
| # Name: nomad_update.sh | |
| # Description: This script checks that NoMAD.app is installed, then does the following: | |
| # 1- Checks for OS version to run correct launchctl method. | |
| # 2- Unloads the NoMAD LaunchAgent in the user context. | |
| # 3- Runs a .pkg installer of the new NoMAD version on secondary/helper policy | |
| # with custom trigger 'update_nomad'. |
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 | |
| ### | |
| # | |
| # Name: type_TouchBar.sh | |
| # Description: Check for presense of Touch Bar Agent to see if a machine has | |
| # a Touch Bar or not. Results can then be used to create a smart | |
| # group based on type. | |
| # Author: Emily Kausalik (drkausalik@gmail.com) | |
| # Created: 2016-12-15 |
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 | |
| if ioreg | grep "AppleEmbeddedOSSupportHost"; then | |
| touch_bar="Yes" | |
| else | |
| touch_bar="No" | |
| fi | |
| echo "<result>$touch_bar</result>" |
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 | |
| ### | |
| # | |
| # Name: recreate_keychain.sh | |
| # Description: This script deletes the user's login.keychain, prompts | |
| # the current user for their password, and then creates | |
| # a new keychain. Uses Applescript dialog and jamfHelper | |
| # for notifications and password prompt. | |
| # Note: Password prompt via Applescript from Elliot Jordan (github.com/homebysix), |
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
| log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h |
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/sh | |
| ### | |
| # | |
| # Name: set_computerName.sh | |
| # Description: This script is designed to set a computer name during DEP enrollment as follows: | |
| # 1- Get logged-in username | |
| # 2- Format the computer name as $username-mac | |
| # 3- Set computer name/hostname/local hostname and NetBIOSName using formatted name | |
| # 4- To be overly thorough, use jamf setcomputername to set name as well |
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
| # run this in the "execute command" field of a policy in leu of the "complete" message if you want to add a title/subtitle | |
| # can also be put in a bash/shell script | |
| # use single-quotes if you use an exclamation point or other special characters, otherwise double-quotes are fine | |
| /Library/Application\ Support/JAMF/bin/Management\ Action.app/Contents/MacOS/Management\ Action -title "Action Required: Do a thing" -subtitle "No really, this is required." -message 'Comply or get a Justin Bieber desktop background!' |