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/zsh | |
enrollmentStatus=$( /usr/bin/defaults read '/Library/Preferences/EarlyAdopter.plist' Enrolled ) | |
echo "<result>$enrollmentStatus</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 | |
# get name of currently logged in user | |
currentUser=$( /usr/bin/stat -f "%Su" /dev/console ) echo "Current user is $currentUser." | |
# get current user's home folder | |
homeFolder=$( /usr/bin/dscl . read "/Users/$currentUser" NFSHomeDirectory | /usr/bin/awk -F ": " '{ print $2 }' ) | |
# remove account by description name from Accounts sqlite database | |
/usr/bin/sqlite3 "$homeFolder/Library/Accounts/Accounts4.sqlite" 'DELETE FROM ZACCOUNT WHERE ZACCOUNTDESCRIPTION = "Exchange"' |
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
tell application "Microsoft Outlook" | |
make new address book in exchange account 1 with properties {name:"Company Contacts"} | |
make new contact with properties {first name:"Martin", last name:"Moose", email addresses:{{address:"mmoose@talkingmoose.net", type:work}, {address:"martin@aol.com", type:home}}} at address book "Company Contacts" of exchange account 1 | |
end tell |
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
# INSTRUCTIONS | |
# Create a folder on the Administrator Desktop named "Project" | |
# Run the script to generate the AES key | |
# Run the script to generate the Active Directory encrypted password file | |
# Run the script to generate the Jamf Pro encrypted password file | |
# Update the following variables: | |
# JamfProServer |
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
Model information: https://support.apple.com/en-us/HT211238 | |
Published Date: October 25, 2021 | |
Verification: https://regex101.com/r/7nnq4T/13 | |
This regex is complete. Apple is no longer creating Big Sur compatible Macs. | |
(MacBook(10|9|8)|MacBookAir(10|[6-9])|MacBookPro1[1-7]|Macmini[7-9]|MacPro[6-7]|iMacPro1),\d|iMac(14,4|1[5-9],\d|2[01],\d) | |
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
Resources for Jamf's "Script 201 for Apple Admins" webinar on June 18, 2020. | |
"Scripting 101 for Apple Admins" Webinar | |
Video: https://www.jamf.com/resources/webinars/scripting-101-for-apple-admins/ | |
Discussions: https://www.jamf.com/jamf-nation/discussions/32391/scripting-101-for-apple-admins-webinar | |
PDF reference: https://www.jamf.com/blog/scripting-basics-for-everyone/ | |
Time Zone script: | |
https://www.jamf.com/jamf-nation/third-party-products/files/836/settimezone-sh-set-the-time-zone |
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 | |
# wait until the Dock process has started | |
while [[ "$setupProcess" = "" ]] | |
do | |
echo "Waiting for Dock" | |
setupProcess=$( /usr/bin/pgrep "Dock" ) | |
sleep 3 | |
done |
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/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/b99a43948c4784631e9ad60eb714c776 |
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 | |
<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e |
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 | |
# in Terminal run /path/to/script /path/to/Bundle.app | |
installedApp=$1 | |
# get the app's bundle identifier | |
bundleID=$( /usr/bin/defaults read "$installedApp/Contents/Info.plist" CFBundleIdentifier ) | |
# get the installation epoch date for the bundle identifier | |
installEpoch=$( /usr/sbin/pkgutil --pkg-info="$bundleID" | /usr/bin/grep "install-time" | /usr/bin/awk '{ print $2 }' ) |