To rename SharePoint 2010 server we can use to ways:
1. We can use use of the Windows PowerShell Rename-SPServer cmdlet to rename SharePoint and then change server name.
2. But if we have renamed server (for example, in the case of cloned Virtual Machine)
Solution:1.Verify that you are a member of the local Administrators group on the local computer in order to run Stsadm.2.On the drive on which SharePoint Server 2010 is installed, change to the following directory: %COMMONPROGRAMFILES%Microsoft sharedWeb server extensions14Bin.3.Type the following command, and then press ENTER: stsadm -o renameserver -oldservername <oldServerName> -newservername <newServerName>Note:
We do not recommend the use of the Windows PowerShell Rename-SPServer cmdlet because it does not work if the server on which the configuration database is stored has already been renamed.
And when you run PowerShell on your server you get the following error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.