Applescript for disconnecting and re-connecting wired ethernet connection
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.network"
get the name of every anchor of pane id "com.apple.preference.network"
reveal anchor "Ethernet" of pane id "com.apple.preference.network"
end tell
tell application "System Events"
tell process "System Preferences"
get window "Network"
get entire contents of window "Network" --> click ((pop up buttons of window "Network") whose description is "Disconnect")
click button "Disconnect" of group 1 of window "Network"
delay 2
click button "Connect" of group 1 of window "Network"
end tell
end tell