Switch network location
Switches to a named network location, such as Automatic or Office.
Switch network location to name
Keyboard Maestro: SetNetworkLocation
Details #
Switches the Mac to the network location called name, the same as choosing it from the Location menu in the Network settings. Locations hold sets of network settings, so this changes your network setup in one go.
The name must match a location that exists. The step has no output.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
location | text | Another spelling of name. | ||
name | text | The location's name, like Automatic. Required. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
This really switches your network location, and Automatic is the standard one:
- Switch the network location to “Automatic”
- Show “Network location: Automatic”
Gotchas #
The step runs the
networksetuptool. If it fails, the step fails with "couldn't switch to the network location …" and the tool's own message, for example when no location has that name.In a dry run the step is simulated.