Friday, 16 April 2010

Network Connections

I am forever disabling and enabling my Wireless connection depending on whether wireless is available and if I have a cable plugged in. If both are available I will always plug in the cable but to ensure that I use the cable I disable my Wireless connection.

I wondered therefore if I could script this (yes, I could just disconnect or even use the switch on the side of my laptop but I like to script stuff!) - turns out you can:

netsh interface set interface "Wireless Network Connection" disable

and as you might expect:

netsh interface set interface "Wireless Network Connection" enable.

Just use the correct name for the network connection you want to enable/disable.

No comments:

Post a Comment