SharePoint 2013

Applies to: SharePoint Foundation 2013, SharePoint Server 2013 Enterprise

Topic Last Modified: 2015-03-09

Returns all managed paths that match the given criteria.

Get-SPManagedPath [[-Identity] <SPPrefixPipeBind>] -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
Get-SPManagedPath [[-Identity] <SPPrefixPipeBind>] -HostHeader <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>]

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.

The Get-SPManagedPath cmdlet returns the SharePoint managed path that matches the provided Identity for either a Web application, site collection or for all HostHeader site collections. If an Identity parameter is not provided, all managed paths for the given scope are returned.

HostHeader sites (no matter the Web application in which they are contained) share a single set of managed paths. Use the HostHeader parameter to return host header managed paths.

SharePoint Management Shell


Parameter Required Type Description




Specifies the URL or GUID of the managed path to return.

The type must be a valid URL, in the http://server_name or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).




If provided, the managed paths returned are for the HostHeader sites in the farm.




Specifies the URL or GUID of the Web application from which to get the managed path.

The type must be a valid URL, in the form http://server_name, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).




Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

--------------EXAMPLE 1-----------------

Get-SPManagedPath -WebApplication http://sitename

This example returns all managed paths for the specified Web application.

--------------EXAMPLE 2-----------------

Get-SPManagedPath -identity "Sites" -HostHeader

This example gets the Sites managed path from the HostHeader managed paths.