Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
talkingmoose / Turn Bluetooth on or off.zsh
Created August 23, 2026 23:40
Purpose: Example Jamf Platform API Gateway script to run a Jamf Pro command (turn computer Bluetooth on or off).
#!/bin/zsh
:<<'ABOUT_THIS_SCRIPT'
-----------------------------------------------------------------------
Written by:William Smith
Technical Enablement Manager
Jamf
bill@talkingmoose.net
https://gist.github.com/talkingmoose/90b269d7edc8dd3227fd91c33fc32080
@talkingmoose
talkingmoose / 10 More Things Jamf Pro Admins Should Know.md
Last active August 29, 2026 21:18
Resources for my Jamf Nation User Conference 2026 presentation.
@talkingmoose
talkingmoose / Rosetta-dependent apps.zsh
Last active September 15, 2026 16:29
Jamf Pro extension attribute to identity Intel-apps requiring Rosetta to run on Apple Silicon Macs. Requires macOS Sequoia 15 or later.
#!/bin/zsh
:<<'ABOUT_THIS_SCRIPT'
-----------------------------------------------------------------------
Written by:William Smith
Technical Enablement Manager
Jamf
bill@talkingmoose.net
https://gist.github.com/talkingmoose/b3553675a613176b35c27b5c5028e0c2
@talkingmoose
talkingmoose / 1. Welcome.md
Last active July 13, 2026 02:47
MacAdmins Conference at Penn State workshop resources — July 7, 2026
@talkingmoose
talkingmoose / Golden Gate-compatible Macs (regex)
Last active September 15, 2026 02:54
Regex identifies Mac models compatible with macOS 27 Golden Gate. May not be up-to-date with newly released models.
https://www.apple.com/os/macos/
Published Date: June 8, 2026
Updated: June 10, 2026
Verification: https://regex101.com/r/GRwi7n/3
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(BookPro1[78]|1[3-7]|BookAir10|mini9),\d+|iMac21,\d+)$
@talkingmoose
talkingmoose / List active Apple Accounts on macOS.szh
Created April 8, 2026 20:41
Jamf Pro extension attribute to read macOS accounts with active Apple Accounts
#!/bin/zsh
# create a list of local usernames (non-AD) with UIDs between 500 and 1024
usernames=( $( /usr/bin/dscl /Local/Default -list /Users uid | /usr/bin/awk '$2 >= 501 && $2 <= 1024 { print $1 }' ) )
for aUser in $usernames
do
echo "Evaluating user account $aUser"
# get home directory for user account
@talkingmoose
talkingmoose / DeleteLocalUsers.zsh
Last active July 29, 2025 13:53
Deletes all local user accounts except those specified in "keepUsers".
#!/bin/zsh
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/talkingmoose/67e5fb6b62855a169eca13e5efb3ba35
@talkingmoose
talkingmoose / 1. Welcome!.md
Last active August 14, 2025 20:57
MacAdmins Conference at Penn State workshop resources — July 15, 2025
@talkingmoose
talkingmoose / iOS 26, iPadOS 26, and watchOS 26 compatible devices (regex)
Last active April 7, 2026 19:42
Regex looks for all iPhone, iPad, and Apple Watch models compatible with iOS 26, iPadOS 26, and watchOS 26. May not be up-to-date with newly released models.
https://www.apple.com/os/ios/
https://www.apple.com/os/ipados/
https://www.apple.com/os/watchos/
Published Date: June 9, 2025
Updated: April 7, 2026
Verification: https://regex101.com/r/tYaV8u/5
@talkingmoose
talkingmoose / Tahoe-compatible Macs (regex)
Last active September 9, 2026 23:40
Regex looks for all Mac models compatible with macOS 26 Tahoe. May not be up-to-date with newly released models.
https://support.apple.com/en-us/122867
Published Date: March 10, 2026
Updated: March 19, 2026
Verification: https://regex101.com/r/YXAchM/9
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-7]|BookAir10|mini9|Pro7),\d+))|iMac2[01],\d+$