Exploring Managed Paths In SharePoint Server 2016

Managed Paths in SharePoint help to define a path under the web application URL which can be used for creating site collections. Multiple site collections can be created under a managed path. Thus, we can aggregate site collections that serve a common purpose or department under one managed path. Say, we have a web application named Department (http://department) and we want to create multiple site collections for HR department. We can create a managed path for HR and create all the site collections under the path (http://department/hr). Similarly, if we want to aggregate site collection for a different department, finance, we can create a managed path for it and create site collections under it. I have summed up the role of managed paths below.



In this article, we will see how we can configure and work with managed paths in SharePoint Server 2016, using UI as well as PowerShell.

Working with Managed Paths using Central Administration

We can create managed paths from central administration’s ‘Manage Web Applications’ page. Select the particular web application and click on ‘Managed Paths’.



This will open up the page where we can define the managed paths. Specify the name for the managed path and mention the type of it. We have two types of managed path.

Explicit Inclusion

When a managed path is created as explicit inclusion, we can create only one site collection under it. If we want to create another site collection, then we will have to define another explicit inclusion managed path and then create the site collection under it. To overcome this limitation, we have the next set of managed path known as Wildcard inclusion.

Wildcard Inclusion

When a managed path is created as wild card inclusion, we can have any number of site collections created under it. In this way, we can create multiple inter-related site collections under the wildcard inclusion managed path.

By default, in a web application, SharePoint creates one explicit inclusion managed path (root) and a wildcard inclusion (/sites) managed path.



Similarly, if we want to remove an already created managed path, we can select the managed path and click on ‘Delete selected paths’.



Working with managed paths, using PowerShell

In order to create managed paths using PowerShell, spin up the SharePoint 2016 Management Shell.



Create Wildcard Managed Path

Let’s see how to create a wildcard inclusion managed path. We will try to create a wild card managed path “BFS”, using the command ‘New-SPManagedPath’, as shown below.

New-SPManagedPath "/BFS" -WebApplication "http://SharePoint2016:51000/"



Create Explicit Inclusion Managed Path

In order to create an explicit inclusion managed path, we can use the same cmdlet. However, we have to mention the keyword ‘-Explicit’ in the command.

New-SPManagedPath "/Insurance" -WebApplication "http://SharePoint2016:51000/" -Explicit



Retrieve All Managed Paths

We can retrieve all the managed paths and their types using the PowerShell cmdlet ‘Get-SPManagedPath’.

Get-SPManagedPath –WebApplication “http://SharePoint2016:51000”



Delete a Managed Path

Now, let’s see how to delete an existing managed path, using PowerShell. We can use the ‘Remove-SPManagedPath’ cmdlet to delete an Explicit/Wildcard Inclusion managed path.

Remove-SPManagedPath -Identity "/BFS" -WebApplication "http://SharePoint2016:51000/"



Summary

Thus, we saw how to work with "Managed Paths" in SharePoint Server 2016, using Central Administration as well as SharePoint 2016 Management Shell.

Up Next
    Ebook Download
    View all
    Learn
    View all