Thanks for coming today!
You’ll find everything you need in these workshop resources. Keep this page handy! *
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://www.apple.com/os/macos/ | |
Published Date: June 9, 2025 | |
Updated: June 24, 2025 | |
Verification: https://regex101.com/r/YXAchM/3 | |
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): | |
^Mac((BookPro1(6,[124]|[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.
#!/bin/zsh | |
# set -x # show command | |
# trap read debug # require a RETURN after each command | |
# download mobile device data from Jamf | |
xml=$( /usr/bin/curl \ | |
--silent \ | |
--url https://hw-model-names.services.jamfcloud.com/1/mobileDeviceModels.xml ) |