I know I can get the Wifi SSID by doing
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -e "s/^ *SSID: //p" -e d
but is there a way to get the VPN name that is currently being used?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you mean a VPN service registered with Network Preferences, AppleScript, specifically System Events’ Network Preferences Suite will work:
If you need to access this from the shell,
osascript -eis your friend (one-eoption per line of AppleScript, mind the quoting and escaping – seeman osascript).