Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
There are so many reasons one would like to rename a SharePoint 2010 web application, whether for consistency sake or to correct misspellings.Now with the power of PowerShell, it’s simple. Please consider the following script would not rename the IIS site and the Application Pool.
So, let’s get down to the renaming the web application by creating a new PowerShell (.ps1) file using Notepad and pasting the following code into it:
$rwa=Get-SPWebApplication | where {$_.Name -match "Your Old Web Application Name"}
$rwa.Name
$rwa.Name="Your New Web Application Name"
$rwa.Update()
Get-SPWebApplication | where {$_.Name -match "Your New Web Application Name"}
Give the file a name, like RenameWebApp.ps1, and save on your SharePoint 2010 server.
Open SharePoint 2010 Management Shell and make sure you are on the path where your .PS1 file located.
Example: C:\ ./RenameWebApp.ps1
Hit Enter and your web application has a new name.
Go to SharePoint 2010 Central Administration >> Application Management and click “Manage web application” to see that your web application has a new name.