Thanks for coming today!
You’ll find everything you need in these workshop resources. Keep this page handy! *
| #!/bin/zsh | |
| <<ABOUT_THIS_SCRIPT | |
| ----------------------------------------------------------------------- | |
| Written by:William Smith | |
| Professional Services Engineer | |
| Jamf | |
| [email protected] | |
| https://gist.github.com/talkingmoose/67e5fb6b62855a169eca13e5efb3ba35 |
Thanks for coming today!
You’ll find everything you need in these workshop resources. Keep this page handy! *
| https://www.apple.com/os/ios/ | |
| https://www.apple.com/os/ipados/ | |
| https://www.apple.com/os/watchos/ | |
| Published Date: June 9, 2025 | |
| Verification: https://regex101.com/r/tYaV8u/4 | |
| 1) Exact regex — Matches major model identifier numbers based on Jamf's hardware model identifiers list (more accurate): |
| https://support.apple.com/en-us/122867 | |
| Published Date: September 15, 2025 | |
| Updated: September 24, 2025 | |
| Verification: https://regex101.com/r/YXAchM/5 | |
| 1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): | |
| ^Mac((BookPro1(6,[1-4]|[78],\d)|(1[3-6]|BookAir10|mini9|Pro7),\d+))|iMac2[01],\d+$ |
| #!/bin/zsh | |
| # set -x | |
| :<<ABOUT_THIS_SCRIPT | |
| ----------------------------------------------------------------------- | |
| Written by:William Smith | |
| Partner Program Manager | |
| Jamf | |
| [email protected] |
| #!/bin/zsh | |
| # get last reboot date and time | |
| lastReboot=$( /usr/bin/last -y reboot ) | |
| # extract date and time (e.g. Thu Dec 12 2024 08:35) | |
| rebootTime=$( /usr/bin/awk -F '[[:space:]]{3,}' 'NR==1 { print $2 }' <<< "$lastReboot" ) | |
| # convert date and time to ISO date format | |
| lastRebootISO=$( /bin/date -j -f "%a %b %e %Y %H:%M" "$rebootTime" '+%Y-%m-%d %I:%M:00' ) |
| #!/bin/zsh | |
| :<<ABOUT_THIS_EXTENSION_ATTRIBUTE | |
| ----------------------------------------------------------------------- | |
| Written by:William Smith | |
| Technical Enablement Manager | |
| Jamf | |
| [email protected] | |
| https://gist.github.com/talkingmoose/4a2b613bf5273081459bc62c644193eb |
| #!/bin/zsh | |
| # set -x # show command | |
| :<<ABOUT_THIS_SCRIPT | |
| Written by:William Smith | |
| Technical Enablement Manager | |
| Jamf | |
| [email protected] | |
| https://gist.github.com/talkingmoose/4a950a715ad07ae3baecce2f46b0a7e5 |
Download a PDF of my slides and notes
Example code from my MacAdmins Conference at Penn State 2024 presentation.