A while ago I wrote about the networksetup command, which provides a command-line interface to network preferences, as well as the systemsetup command, which provides command-line control over additional system-level preferences. In the past those commands were stored in the labyrinthian:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support
Yes, inside the ARDAgent. Perfect.
Finally Apple has put those commands in a location the shell recognizes as a command path. In Leopard they reside in the far more sensible:
/usr/sbin
Now all you have to do to call them is... Well... Call them.
Really now. Was that so hard?