Here is a sample command for renaming a domain-joined computer. Note that to run this command you will need a user account that is a local admin on the remote machine and that has sufficient permissions in active directory to change the computer name:
netdom renamecomputer <computer_name> /newname:<new_name> /userd:<domain>\<username with privilige to do the rename> /passwordd:<password of account> /force /reboot:120
Note that the above command will perform a reboot after 2 minutes, which may not be what you want.
Watch out for things like the password - note the switch is /passwordd, not /password.
Edit - I initially wrote that netdom was a Sysinternals utility, but it is part of the Windows 7 RSAT.