SharePoint 2016 Administration : Configure Managed Paths using PowerShell

Managed Paths in SharePoint are used to specify the paths in the URL namespace of Web Applications to be shared by the Site Collections hosting by the Web Application.

We have got two kinds of Managed Paths that can be created with in SharePoint namely Wildcard and Explicit.

Explicit Managed Paths

Explicit Managed Paths may be used when we are not planning to create Site Collections under a specific Managed Path. We will see the creation of the Explicit Managed Path in this article and it would be like

http://sp-2016-dev/prashant-explicit

In this case we cannot have more one site collection pointing to this URL.

Wildcard Managed Paths

Wildcard Managed Paths may be used when we are planning to create Sites or Sub Sites under a specific Managed Path. We will see the creation of the Wildcard Managed Path in this article and it would be like

http://sp-2016-dev/prashant-wildcard/

In this case we can have more one site collection pointing to the managed path specified by this URL

In this article we will be walking through the steps and PowerShell Scripts involved in creating Managed Paths in SharePoint 2016

  • Launch Central Administration Site
  • Choose “Manage Web Applications”

1

  • Select the Web Application in context of which you want to create the Managed Paths
  • Choose “Manage Paths” Ribbon Control

2

We can see the UI for “Define Managed Paths” screen in the Modal Dialog and this is the place where we can add required managed paths for our Web Application.

3

But since this article is about automating the SharePoint Processes so we will see how to do it using PowerShell in the following sections-

PowerShell Command

Wildcard Managed Paths

  • Launch SharePoint 2016 Management Shell
  • Run the following PowerShell Command to add a Wildcard Managed Path
New-SPManagedPath "Prashant-Wildcard" -WebApplication http://sp-2016-dev

4

We can go back to “Define Managed Path” screen to verify if the new Managed Path has been added for the specific Web Application

5

Explicit Managed Paths

  • Launch SharePoint 2016 Management Shell
  • Run the following PowerShell Command to add a Wildcard Managed Path
New-SPManagedPath "Prashant-Explicit" -WebApplication "http://sp-2016-dev" –Explicit

6

We can go back to “Define Managed Path” screen to verify if the new Managed Path has been added for the specific Web Application

7

Now finally we can verify the availability of the new created Managed Paths to the Site Collections created under the roof of Web Application http://sp-2016-dev

  • Go to Application Management
  • Choose “Create Site Collections”

8

On the “Create Site Collection” screen under “Web Site Address” section we can see the newly created Managed Paths both Wildcard and Explicit type

9

That is all for this demo.

Hope you find it helpful.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s