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 | |
| # list all users with UIDs above 501 | |
| usersList=$( /usr/bin/dscl . -list /Users uid | /usr/bin/awk '$2 >= 501 { print $1 }' ) | |
| # test for admin | |
| while IFS= read aUser | |
| do | |
| /usr/sbin/dseditgroup -o checkmember -u "$aUser" admin 1>/dev/null |
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/zsh | |
| # list of known network services that should be excluded from results | |
| defaultNetworkServices="An asterisk (*) denotes that a network service is disabled. | |
| USB-C Dock Ethernet | |
| Apple USB Ethernet Adapter | |
| Wi-Fi | |
| iPhone USB | |
| Bluetooth PAN | |
| Thunderbolt Bridge" |
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/zsh | |
| enrollmentStatus=$( /usr/bin/defaults read '/Library/Preferences/EarlyAdopter.plist' Enrolled ) | |
| echo "<result>$enrollmentStatus</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 | |
| # 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 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
| 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:"[email protected]", type:work}, {address:"[email protected]", type:home}}} at address book "Company Contacts" of exchange account 1 | |
| end tell |
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
| # 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 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
| 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 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
| 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 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 | |
| # wait until the Dock process has started | |
| while [[ "$setupProcess" = "" ]] | |
| do | |
| echo "Waiting for Dock" | |
| setupProcess=$( /usr/bin/pgrep "Dock" ) | |
| sleep 3 | |
| done |