There are a variety of ways you can determine the system name for a Windows computer from a command line interface (CLI), such as a command prompt or PowerShell prompt window. But what if you wish to rename the computer from a command line interface? You can obtain a command prompt and then use a Windows Management Instrumentation Command-line (WMIC) command in the form shown below where oldname is the curent name of the system and newname is the new name you wish to assign to the system.
wmic computersystem where caption='oldname' rename newname
[ More Info ]