Thursday, August 27, 2009

GUI vs CLI

I always lament the way Microsoft seem to insist on changing user interfaces, seemingly burying things I need to configure one or more clicks away in successive versions of Windows, or implementing "Wizards" which require you to click fill in a piece of information, click Next, fill in another piece of information, click next, and so on. (At the risk of sounding like an old man) I liked the way things were in the NT days e.g. if you needed to configure a WINS Server, most of the settings you needed were presented in a single properties page e.g.:



This allowed you to enter everything required and hit OK once instead of hitting Next umpteen times.

Thankfully there isn't a Wizard (yet) for setting up IP addresses, but there's still a significant number of mouse clicks required to get the job done. At least the command line is never more than six key strokes away (Windows Key+R - cmd - Return). So rather than wearing out the button on your mouse, the next time you need to configure IP addresses at the command line, try netsh instead:

Set an IP address
netsh interface ip set address name="Local Area Connection" static ip mask gateway metric e.g.:
netsh interface ip set address name="Local Area Connection" static 10.10.1.100 255.255.255.0 10.10.1.1 1

Primary DNS
netsh interface ip set dnsserver name="Local Area Connection" static DNSServerIPAddress e.g.:
netsh interface ip set dnsserver name="Local Area Connection" static 82.195.128.192

Secondary DNS
netsh interface ip add dnsserver "Local Area Connection" DNSServerIPAddress e.g.:
netsh interface ip add dnsserver "Local Area Connection" 82.195.146.192

No comments: