Search
Website

Sharepoint 2013 : Farm Management - Rename a Server on the Farm, Display the Configured Managed Paths

Published 2 min readBy Programming4us Editorial Team

Rename a Server on the Farm


Scenario/Problem: You want to rename a server that participates in the SharePoint farm.


Solution: Use the Rename-SPServer cmdlet.

The Rename-SPServer cmdlet renames a server in the farm. However, note that it renames the server only from a SharePoint standpoint and does not actually rename the physical server. Use the current name as the Identity parameter and the new name for the Name parameter, as shown in Listing 1.

Listing 1. Renaming a Server on the Farm


Rename-SPServer -Identity "OldServerName" -Name "NewServerName"



Warning

If the rename procedure does not complete successfully, the server being renamed may no longer function as a SharePoint server. Running the SharePoint 2013 Products Configuration Wizard may resolve any issues; however, there is the potential of configuration database corruption forcing you to rebuild the SharePoint farm.



Display the Configured Managed Paths


Scenario/Problem: You need to display the current managed paths configured on a web application in the farm.


Solution: Use the Get-SPManagedPath cmdlet with an associated web application.

Issuing the Get-SPManagedPath cmdlet with the WebApplication parameter (as shown in Listing 2) displays all configured managed paths on the SharePoint farm, as shown in Figure 1.

Listing 2. Retrieving Configured Managed Paths


Get-SPManagedPath -WebApplication "SharePoint - 80"


Image

Figure 1. Get-SPManagedPath displays all configured managed paths.

Create a New Managed Path


Scenario/Problem: You want to create a new managed path in a web application on the SharePoint farm.


Solution: Use the New-SPManagedPath cmdlet.

Using the New-SPManagedPath cmdlet enables you to create a new managed path on the specified web application, as shown in Listing 3.

Listing 3. Creating a New Managed Path


New-SPManagedPath -WebApplication "SharePoint - 80"
-RelativeURL "/teamsites/"


The forward slashes (/) in the name of the managed path are optional but provide a visual queue (similar to manually creating a managed path through Central Administration).

By default, the managed path is created as a wildcard inclusion type. You can use the Explicit switch parameter to generate the managed path as an explicit inclusion type, as shown in Listing 4.

Listing 4. Creating a New Managed Path with Explicit Inclusion


New-SPManagedPath -WebApplication "SharePoint - 80" -RelativeURL
"/departments/" -Explicit



Tip

You may also create a managed path using the HostHeader parameter instead of the WebApplication parameter. New-SPManagedPath has two parameter sets for this purpose.