v1.0 = Production Version

+ Production Version
This commit is contained in:
Zack T
2017-09-30 12:18:25 -07:00
parent 6084c25379
commit be7e19f17b

View File

@@ -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 "<result>Not Connected</result>"
else
echo "<result>$wiFiSSID</result>"
fi
exit 0