Get-SPManagedPath
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
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>]
Parameters
1| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPPrefixPipeBind | 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). | ||
| WebApplication | Required | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | 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). | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | 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.
|
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPPrefixPipeBind | 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). | ||
| HostHeader | Required | System.Management.Automation.SwitchParameter | If provided, the managed paths returned are for the HostHeader sites in the farm. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | 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.
|
Detailed Description
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.
Input Types
Return Types
--------------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.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: