Managed Paths in SharePoint 2010 using PowerShell



In this article we will be seeing about Define Managed paths in SharePoint 2010.

In this article:

  • How to get all the managed paths for a web application
  • How to create a new managed path for a web application
  • How to remove a defined managed path from a web application

How to get all the managed paths for a web application:

Using Central Administration:
  • Go to Central Administration => Application Management => Manage web applications.
  • Select the web application for which you want to see all the defined managed paths.

    1.gif
     
  • In the ribbon, click on "Managed Paths" and you could see all the defined managed paths for the web application.

    2.gif

Using Powershell:
  • On the Start menu, click All Programs.
  • Click Microsoft SharePoint 2010 Products.
  • Click SharePoint 2010 Management Shell.
  • Type the following command.

    Get-SPManagedPath -WebApplication "http://serverName:2010/"
     
  • All the defined managed paths for the web application will be retrieved as shown in the following.

    3.gif

How to create a new managed path for a web application:

Using Central Administration:
  • Go to Central Administration => Application Management => Manage web applications.
     
  • Select the web application for which you want to create a new managed path.

    4.gif
     
  • In the ribbon, click on "Managed Paths" and you could see all the defined managed paths for the web application.
  • Type the Path, for example "/HR".
  • Select the type of inclusion from the drop down.
  • Click on "Add Path", a new managed path is created successfully.

Using Powershell:
  • On the Start menu, click All Programs.
  • Click Microsoft SharePoint 2010 Products.
  • Click SharePoint 2010 Management Shell.
  • Type the following command to create a new managed path with "Wildcard inclusion".

    New-SPManagedPath "/Chennai" -WebApplication "http://serverName:2010/"
     
  • Type the following command to create a new managed path with "Exclusion inclusion".

    New-SPManagedPath "/Pune" -WebApplication "http://serverName:2010/" -explicit

    5.gif

How to remove a defined managed path from a web application:

Using Central Administration:
  • Go to Central Administration => Application Management => Manage web applications.
     
  • Select the web application for which you want to delete a defined managed path.

    6.gif
     
  • In the ribbon, click on "Managed Paths" and you could see all the defined managed paths for the web application.
  • Select the Managed path that you want to delete and click on "Delete selected Paths".

    7.gif

Using Powershell:
  • On the Start menu, click All Programs.
  • Click Microsoft SharePoint 2010 Products.
  • Click SharePoint 2010 Management Shell.
  • Type the following command to remove a managed path with confirmation prompt.

    Remove-SPManagedPath -Identity "/Pune" -WebApplication "http://serverName:2010/"
     
  • Type the following command to remove a managed path without confirmation prompt.

    Remove-SPManagedPath -Identity "/Pune" -WebApplication "http://serverName:2010/" -confirm:$false
     

Up Next
    Ebook Download
    View all
    Learn
    View all