With this you can change computer name using Terminal or command Line, it doesn’t matter if is a domain computer or not
wmic COMPUTERSYSTEM where name="Original_name" call rename name="New_name"
If it’s ok you’ll get something similar than this:
instance of __PARAMETERS
ReturnValue = 0;
That’s all, take in mind that you can change to a remote computer executing commands thru a PsExec