apple script to add IP information

osxman
osxman used Ask the Experts™
on
Hi Experts,

I'm looking for an apple script which will allow me to change the 'static' IP info on an OSX 10.6.7 iMac. for example:
!P address
subnet
router
gateway
dns
search
and anything else that is needed when setting a manual IP

Cheers
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
networksetup -setmanual Ethernet clientip subnet router
networksetup -setdnsservers Ethernet dns1 dns2
networksetup -setsearchdomains domain1 domain2

Everything after Ethernet (or Airport)/setsearchdomains is the information you want to add.
These are the commands to work into your script. type man networksetup in terminal to get more options.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial