Unextend a Web application (SharePoint Foundation 2010)
Applies to: SharePoint Foundation 2010
This article describes how to unextend a Web application. When you unextend a Web application, you remove the association between the Web application on the one hand and the IIS Web site and zone on the other hand. You would typically unextend a Web application if you want to be able to use the Web application at a later time, but do not want it to be available on that particular IIS Web site. This enables you to preserve the content databases and Web application settings associated with the Web application for later reuse.
If you update the alternate access mapping URLs of a Web application, SharePoint Foundation 2010 does not automatically update the IIS bindings. To fix this issue, you must unextend the Web application from the associated zone, and then re-extend the Web application with the updated IIS bindings.
You can also delete the IIS Web site if it is only hosting SharePoint-based content and you do not need the IIS Web site anymore.
Before you perform these procedures, confirm that:
No one is using the Web application zone that you want to unextend.
If you have User Account Control (UAC) turned on in Windows and you use Windows PowerShell to unextend a Web application, you must right-click the SharePoint 2010 Management Shell and select Run as administrator.
You can unextend a Web application by using the SharePoint Central Administration Web site or Windows PowerShell. You typically use Central Administration to unextend a Web application in a single server with built-in database deployment. If you want to automate the task of unextending a Web application, which is common in enterprises, use Windows PowerShell.
To unextend a Web application by using Central Administration
Verify that you have the following administrative credentials:
- To unextend a Web application, you must be a member of the Farm Administrators SharePoint group and a member of the local Administrator group on the computer running Central Administration.
On the Central Administration Home page, in the Application Management section, click Manage web applications.
Select the Web application that you want to unextend, and on the ribbon, select Delete, and then click Remove SharePoint from IIS Web Site.
On the Remove SharePoint From IIS Web Site page, in the Deletion Options section, in the Select IIS Web site and zone to remove list, click the name Web application that you want to unextend from the IIS Web site and zone.
Under Delete IIS web sites, do one of the following:
Select Yes if you want to delete the IIS Web site.
Select No if you do not want to delete the IIS Web site.
Click OK.
To unextend a Web application by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin. You must also be a member of the local Administrators group on the computer running Central Administration.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following command:
Remove-SPWebApplication -identity http://sitename -Zone {Default | Intranet | Internet | Internet | Custom | Extranet} -Confirm
This command removes the zone that you have specified for the Web application extension at
http://sitename
. This command does not remove the content databases or the IIS Web site.Note
Be aware that this cmdlet can be used to delete the Web application, so be sure to use the appropriate parameters.
For more information, see Remove-SPWebApplication.
Note
We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.