From be7e19f17b67dd239d5696ee80bf91afe9f5de43 Mon Sep 17 00:00:00 2001 From: Zack T Date: Sat, 30 Sep 2017 12:18:25 -0700 Subject: [PATCH] v1.0 = Production Version + Production Version --- .../Extension Attributes/jamf_ea_GetSSID.sh | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Jamf Pro/Extension Attributes/jamf_ea_GetSSID.sh diff --git a/Jamf Pro/Extension Attributes/jamf_ea_GetSSID.sh b/Jamf Pro/Extension Attributes/jamf_ea_GetSSID.sh new file mode 100644 index 0000000..c60ff1d --- /dev/null +++ b/Jamf Pro/Extension Attributes/jamf_ea_GetSSID.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +################################################################################################### +# Script Name: jamf_ea_GetSSID.sh +# By: Zack Thompson / Created: 9/26/2017 +# Version: 1.0 / Updated: 9/26/2017 / By: ZT +# +# Description: A Jamf Extension Attribute to grab the WiFi SSID. +# +################################################################################################### + +wiFiSSID=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep -w 'AirPort\|SSID' | awk -F ": " '{print $2}') + +if [[ -z $wiFiSSID ]]; then + echo "Not Connected" +else + echo "$wiFiSSID" +fi + +exit 0 \ No newline at end of file