Export (0) Print
Expand All
Expand Minimize

New-SPManagedPath

 

Applies to: SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

Creates a new managed path for the given Web application for all host header site collections.

New-SPManagedPath [-RelativeURL] <String> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Explicit <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
New-SPManagedPath [-RelativeURL] <String> -HostHeader <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Explicit <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

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 New-SPManagedPath cmdlet adds a new managed path to a given Web application or for use with all host header site collections. If the HostHeader switch is provided, the managed path is shared among all host header site collections; otherwise, a Web application must be specified to create this managed path within. The relative URL is a partial URL that represents the managed path. When the slash mark (/) is used, the root is defined. If the Explicit parameter is not provided, the new managed path is a wildcard path.

 

Parameter Required Type Description

RelativeURL

Required

System.String

Specifies the relative URL for the new managed path.

The type must be a valid partial URL such as site or sites/teams/.

HostHeader

Required

System.Management.Automation.SwitchParameter

If this parameter is provided, this managed path applies to all host header site collections.

WebApplication

Required

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

Specifies the Web application group to add this path.

The type must be a valid URL, in the form http://server_name, or a GUID, in the form 1234-5678-0987645a.

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.

NoteNote:
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.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Explicit

Optional

System.Management.Automation.SwitchParameter

Specifies whether the managed path is explicit or wildcard.

If not provided, the managed path is a wildcard path.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

------------------EXAMPLE-----------------------

New-SPManagedPath "Teams" -WebApplication "http://somesite"

This example creates a Teams managed path for a given Web application (http://somesite).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft