|Open Command Prompt.|
netdom computername CurrentComputerName/add:NewComputerName
This command will update the service principal name (SPN) attributes in Active Directory for this computer account and register DNS resource records for the new computer name. The SPN value of the computer account must be replicated to all domain controllers for the domain and the DNS resource records for the new computer name must be distributed to all the authoritative DNS servers for the domain name. If the updates and registrations have not occurred prior to removing the old computer name, then some clients may be unable to locate this computer using the new or old name.
Ensure the computer account updates and DNS registrations are completed, then type:
netdom computername CurrentComputerName /makeprimary:NewComputerName
Restart the computer.
From the command prompt, type:
netdom computername NewComputerName /remove:OldComputerName