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
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h |
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: 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 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 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 ([email protected]) | |
# Created: 2016-12-15 |
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: 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 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 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/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 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 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 | |
# | |
# NoMAD_LastPasswordExpireDate | |
# Checks NoMAD plist for LastPasswordExpireDate (AD password expiration) | |
# By github.com/smashism | |
# Last modified 2016-11-30 | |
# Provided as-is with no support or warranty | |
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");') |