Scripts for Sharepoint 2010 & Sharepoint 2013

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Scripts for Sharepoint 2010 & Sharepoint 2013

Anil Avula
Administrator
How to Rename Web Application Name In SharePoint 2010

There are so many reasons one would like to rename a SharePoint 2010 web application, whether for consistency sake, even to correct misspellings, now with the power of Power Shell it’s just simple. Please be 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 Power Shell (.ps1) file using Notepad and by 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 it a name, like RenameWebApp.ps1 and save in your SharePoint 2010 server.
Open SharePoint 2010 Management Shell, make sure you are under 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 on “Manage web application” to see that you web application has a new name

- See more at: http://expertsharepoint.blogspot.de/2013/10/how-to-rename-webapplication-in.html#sthash.7aEOuVqN.dpuf
Anil Avula's SharePoint Blog[MCP,MCSE,MCSA,MCTS,MCITP,MCSM]