« Some command - line tips for Apple Remote Desktop and OS X | Main | Hallelujah! »
In my last posting, I left out a command, networksetup, because I was incorrectly thinking that it only worked on Mac OS X Server. Luckily, some folks were nice enough to point out my error, so this time I'll go over networksetup. This command allows you to set various network settings for any Mac running a current version of the Apple Remote Desktop client. Like systemsetup, networksetup won't let you set every possible network setting, but it should take care of an Ivory Percentage's worth.
Technorati Tags: Apple, Apple Remote Desktop, Mac OS X, Tech Support
networksetup lives in /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/, and although you don't need sudo to get information from it, you will need to be able to use sudo to set parameters. With networksetup you can:
- get the network service order
- get a list of all network services
- get a list of all hardware ports with corresponding device name and MAC address
- detect new network hardware
- get the MAC address of a hardware port or device
- get/set the computer name
- get information for a given network service
- set up a manual IPv4/IPv6 configuration for a given service
- set up a DHCP IP configuration
- set up a BOOTP IP configuration
- set up a manual IPv4 service that uses DHCP for router and other information
- disable IPv4 and/or IPv6 for a given network service
- set a given network service to automatically acquire IPv6 information
- get/set DNS servers for a given service
- get/set search domains for a given service
- set up a 6 to 4 service
- set up a 6 to 4 service to acquire settings automatically
- set up manual settings for a 6 to 4 service
- enable/disable ftp/http/https/streaming/gopher/socks proxies
- get/set ftp/http/https/streaming/gopher/socks proxy information
- get/set proxy bypass domains
- get/set passive FTP settings for a given service
- get/set current Airport network
- get/set Airport Power
- enable/disable a given network service
- create/destroy/rename/duplicate/order network services
- get/set AppleTalk on/off state for a given service
- get/set MTU values for a hardware port or device
- list valid MTU ranges for a hardware port or device
- get/set media settings for a hardware port or device
- list valid media settings for a hardware port or device
- create/destroy/list VLANs for a given device
- list the devices that support VLANs
- create/destroy/list hardware bonds
- add/remove devices to/from hardware bonds
- list the devices that support hardware bonding
- get the status of a given hardware bond
defaults write com.apple.Bluetooth "ControllerPowerState" 1 to turn Bluetooth on, and defaults write com.apple.Bluetooth "ControllerPowerState" 0 to turn Bluetooth off. SIGHUP blued to actually change the power state, and Bob's your uncle.
So that's a quick look at networksetup. If you come up with an Apple Remote Desktop command I've missed, please let me know in the comments, and I'll see about getting that up as well.
