Monday, April 04, 2011

Renaming a SharePoint 2010 Server (Standalone)

Before my Training sessions, I setup the lab by Installing & Configuring SharePoint 2010 and all other tools on one physical machine and then we ghost the Hard Disk image to the rest of the machines. Once that's done, we power on the boxes and find that all of them report 'duplicate name on the network' error. So the Network admin then renames the boxes and SharePoint no longer works.

For MOSS 2007, we had some stsadm commands which used to do the trick. Since, powershell is available now, we can use PowerShell cmdlets for SharePoint.

Here's how a SharePoint 2010 server rename is done -

1. Fire up the SharePoint 2010 Management Shell (recommended to run as Administrator)

2. Run the following Powershell command -


Rename-SPServer [-Identity] <originalservername> -Name <newservername>


where <originalservername> is the current name of the Server and <newservername> is the new name of the Server.

For example, if your current server is called MACHINE01 and new server name will be BOX01 then you can write -

Rename-SPServer -Identity MACHINE01 -Name BOX01

3. Run IISRESET / noforce

4. Rename the Server and restart the machine. Start the management shell again.

4. Modify alternate access mappings for Central Admin using PowerShell -

Although the server has been renamed, the Sites will be having the old server name in their URLs so one has to change the Alternate access mappings for Central Admin and other sites. This can be done using the cmdlet called Set-SPAlternateURL as shown below -


Set-SPAlternateURL -Identity <old URL to the central admin site> -Url <new URL to the central admin>


For example if the old central admin site was at - http://machine01:8080 and the new server name is BOX01 then you will write -

Set-SPAlternateURL -Identity http://machine01:8080 -Url http://box01:8080

Now you will be able to get into the Central Admin site. You can then go and change the alternate access mappings for the rest of the sites through the Central Admin site instead of doing via PowerShell.

Here's the official Technet page for this topic.

Note: Never use the _ (underscore) in your host names because it causes problems with Cookies and your SharePoint sites will not work. Also avoid the - (hyphen) as far as possible in host names.

No comments:

Post a Comment

Using Recoil with SPFx Try out the latest alternative to Redux with SPFx When developing with Redux or MobX, we have ha...