Remove-SPSiteUrl
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Removes an URL mapping from the site.
Remove-SPSiteUrl [-Url] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
Parameters
| Parameter | Required | Type | Description | ||
|---|---|---|---|---|---|
| Url | Required | System.String | Specifies the URL to remove. | ||
| 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.
| ||
| 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 | ||
| 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 |
Detailed Description
The Remove-SPSiteUrl cmdlet removes an URL mapping from the site.
The Remove-SPSiteUrl cmdlet only applies to the root site collection for a host name, that is, http://www.contoso.com. This cmdlet cannot be directly run against a managed path site collection underneath the root, that is, http://www.contoso.com/sites/test.
Note: |
|---|
| You cannot remove the primary URL for a given site collection, which is typically defined as the first URL in the default zone. |
Input Types
Return Types
------------EXAMPLE------
Remove-SPSiteURL -Url http://contoso.sharepoint.com
This example removes the URL from the site collection, http://contoso.sharepoint.com.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: