This is an old revision of the document!
wmic computersystem where caption='currentname' rename 'newname'
netdom renamecomputer %COMPUTERNAME% /Newname "NEW-NAME"
Then reboot to activate the new hostname:
shutdown -r -t 0