Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions Jamf Pro/Extension Attributes/Get-LatestOSSupported.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
####################################################################################################
# Script Name: Get-LatestOSSupported.sh
# By: Zack Thompson / Created: 9/26/2017
# Version: 2.7.0 / Updated: 6/11/2025 / By: @HowardGMac
# Version: 2.7.1 / Updated: 7/21/2026 / By: @HowardGMac
#
# Description: A Jamf Pro Extension Attribute to check the latest compatible version of macOS.
#
Expand Down Expand Up @@ -79,6 +79,7 @@ not_ventura_regex="^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-7]),[0-9]|(Macmini|MacBook
not_sonoma_regex="^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|(Macmini|MacBookAir)[1-7],[0-9]|MacBook[0-9,]+|MacBookPro([1-9]|1[0-4]),[0-9])$"
not_sequoia_regex="^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-8]),[0-9]|Macmini[1-7],[0-9]|MacBookAir[1-8],[0-9]|MacBookPro([1-9]|1[0-4]),[0-9])$"
not_tahoe_regex="^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-9]),[0-9]|iMacPro1,1|Macmini[1-8],[0-9]|MacBookAir[1-9],[0-9]|MacBookPro((16,3)|([1-9]|1[0-5]),[0-9]))$"
not_goldengate_regex="^(MacPro[1-6],[0-9]|iMac([1-9]|1[0-9]|20),[0-9]|iMacPro1,1|Macmini[1-8],[0-9]|MacBookAir[1-9],[0-9]|MacBookPro([1-9]|1[0-6]),[0-9]|MacBook([1-9]|10),[0-9])$"

##################################################
# Setup Functions
Expand Down Expand Up @@ -125,8 +126,10 @@ model_check() {
echo "Sonoma*"
elif [[ $model =~ $not_tahoe_regex ]]; then
echo "Sequoia*"
else
elif [[ $model =~ $not_goldengate_regex ]]; then
echo "Tahoe*"
else
echo "Golden Gate*"
fi
}

Expand All @@ -145,6 +148,11 @@ os_check() {
# For all models except MacPro5,1...

if [[
"${validate_os}" == "Golden Gate*" && \
( "${os_major}" -ge 11 || "${os_major}" -eq 10 && "${os_minor}" -ge 9 )
]]; then
echo "Golden Gate*"
elif [[
"${validate_os}" == "Tahoe*" && \
( "${os_major}" -ge 11 || "${os_major}" -eq 10 && "${os_minor}" -ge 9 )
]]; then
Expand Down Expand Up @@ -360,6 +368,13 @@ storage_check() {
# Set the required free space to compare.
# Set space requirement in bytes: /usr/bin/bc <<< "<space in GB> * 1073741824"
case "${validate_os}" in
"Golden Gate*"* )
# Value's inherited from Monterey, Apple has not defined these requirements
required_free_space_newer="27917287424" # 26GB if Sierra or later
os_newer="10.12.0"
required_free_space_older="47244640256" # 44GB if El Capitan or earlier
os_older="10.11.0"
;;
"Tahoe*"* )
# Value's inherited from Monterey, Apple has not defined these requirements
required_free_space_newer="27917287424" # 26GB if Sierra or later
Expand Down Expand Up @@ -478,6 +493,9 @@ fi
model_result=$( model_check "${mac_model}" )

case "${model_result}" in
"Golden Gate*" )
version_string="27"
;;
"Tahoe*" )
version_string="26"
;;
Expand Down