How do I rename a Windows computer from command line?

Solution 1:

You can use the Win32_ComputerSystem WMI class and invoke the rename method. You can implement the WMI call in a vbscript, or powershell or however you choose to run the process.

Solution 2:

You can use NETDOM

NETDOM RENAMECOMPUTER %COMPUTERNAME% /NewName:%NEWNAME%

See this article