I'm looking for a way to disconnect from my current WIFI network via CLI. There is a way to do that, but it's a GUI way.
Any ideas how to accomplish that?
Note: I don't want to disable Wi-Fi because I need Airdrop to be function so I just want to disconnect it from the existing network.
EDIT: Why do I want this?
At work we connect out MBPs to Displays w/ ethernet attached. Also we heavily use AirDrop functionality. The aim is to write a script, that automatically disconnects from WIFI networks, when ethernet cable is plugged in, so that we can still use other WIFI features like AirDrop & Apple Watch unlocking.