Friday, 22 June 2012

Rename SharePoint webapplication and SharePoint standalore server names

Rename SharePoint 2010 web application :

If anybody would like to rename a SharePoint 2010 web application name to correct the misspellings, you can simple PowerShell script.

The following script would rename the SharePoint application name only, not to IIS site and the Application pool,

First create PowerShell file(.ps1) with notepad by using with below code

$rwa=Get-SPWebApplication | where {$_.Name -match "Old Web Application Name"}
$rwa.Name
$rwa.Name="New Web Application Name"
$rwa.Update()
Get-SPWebApplication | where {$_.Name -match "New Web Application Name"}

Just save in under D:\renameapp.ps1 on your SharePoint 2010 server.
Open SharePoint 2010 Management Shell as Administrator mode, and do as like below screen shot


Go to Central Admin--> Manage web application--> here you should able to see the Web application with updated new name.

Rename SharePoint standalone server  :

Rename a stand-alone server by using with below Windows Powershell

Rename-SPServer [-Identity] <OriginalServerName> -Name <NewServerName>
To ensure that the rename operation is complete, run iisreset /noforce at a Windows command prompt
For detailed information and precess about Renaming the SharePoint standalone server name see this technet library.

No comments:

Post a Comment