How to create managed path for a web application using PowerShell?

How to create managed path for a web application using PowerShell?

In this post we will discuss how we can create and remove managed path using PowerShell for a web application. In my previous article we have discussed about managed path as well as how we can create a managed path using browser from central administration.

We can also create managed path using SharePoint 2013 management Shell (PowerShell) in SharePoint 2013.

You may read:
– CAML Query Designer in Sharepoint 2013 Online

– Change landing home page in SharePoint

– Add datepicker in SharePoint 2013 using client object model

For Explicit inclusion:
For explicit inclusion below is the PowerShell command, we we need to add -explicit parameter.

New-SPManagedPath “/Technology” -WebApplication “http://mynewwebapp:42885/” -explicit

How to create managed path for a web application using PowerShell?
How to create managed path for a web application using PowerShell?

Now if you will create a site collection, then in the URL you will be able to see the path created like below:

How to create managed path for a web application using PowerShell?
How to create managed path for a web application using PowerShell?

For Wildcard inclusion:
If you will not mention the -explicit parameter then it will become Wildcard inclusion. The command will be looks like below:

New-SPManagedPath “/Finance” -WebApplication “http://mynewwebapp:42885/”

Once you will run it will display like below:

How to create managed path for a web application using PowerShell?
How to create managed path for a web application using PowerShell?

After this when you will create the site collection, it will display like below:

How to create managed path for a web application using PowerShell?
How to create managed path for a web application using PowerShell?

Remove managed path using PowerShell:
We can use the below PowerShell command to remove managed path

Remove-SPManagedPath -Identity “/Finance” -WebApplication “http://mynewwebapp:42885/”


It will ask a confirmation message and once you click on Yes, it will remove.

How to create managed path for a web application using PowerShell?
How to create managed path for a web application using PowerShell?

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →