How to restore SharePoint 2010 Foundation after PC renaming

sharepoint-2010

I renamed local PC name and after reboot SharePoint 2010 Foundation does not work anymore.

At this page it is described to use the PowerShell command:

Rename-SPServer [-Identity] <OriginalServerName> -Name <NewServerName>

I launched PowerShell with Administrator permissions but the execution failed with the message

"Rename-SPServer : The farm is
unavailable"

Do you known which could be the problem?

Best Answer

Rename-SPServer needs to be run BEFORE the servername is changed. It seems that it is a good idea to use the stsadm -o renameserver command instead, even though Microsoft recommends using the powershell command.

See the following article: http://aanikin.wordpress.com/2010/09/01/how-to-rename-sharepoint-2010-server/

I just used the stsadm command successfully when renaming a standalone server, but i did run it before renaming the server. I think that this is generally a good idea.

If everything fails, you can probably run the SharePoint 2010 Products Configuration Wizard and then through Central Administration backup and restore your site collections.