I was in middle of the installation and system was throwing exception that instance name must be same as of machine name. so I had to update the instance name of SQL server. following is a script I found online and it was really helpful.
---- Fetch the SQL Server instance name - fetch the value of "name" from the output
-- Drop the old server registration
-- Register the new server with the new name