Resetting Network Adapters/Services

yurypanasyuk
New Contributor III

Hey everyone,

I have seen a few old posts on resetting network adapters but looking for a better way. My current script does ok but how do you add any new detected adapters back in. Seems like my current method only adds Apples standard/default adapters.

#!/bin/sh
networksetup -createlocation TempLocation populate && networksetup -switchtolocation TempLocation
networksetup -deletelocation Automatic
networksetup -createlocation Automatic populate && networksetup -switchtolocation Automatic
networksetup -deletelocation TempLocation
0 REPLIES 0