When you want to rename a computer, you can use the netdom comandline tool.

 

* Rename a computer:

netdom renamecomputer %COMPUTERNAME% /NewName:[new-computer-name] /force

 
Which uses the following syntax:

  • new-computer-name: the new name you want the computer to have..

 

The following sources have been used to create this post:
Microsoft Technet – Netdom syntax