I'm searching an AppleScript to automatically start my University VPN if I'm connected to the University network. I already found some solutions for older OS X Versions, but they're not working anymore on El Capitan.
Edit: An existing solution does not work on El Capitan, I'm getting this error:
Can’t get current configuration of service id "B7124700-2559-4F93-BC2A-205723054B5B" of network preferences. System Events got an error: Can’t get current configuration of service id "B7124700-2559-4F93-BC2A-205723054B5B" of network preferences. (-1728)