This article describes how to delete a Web application. When you delete a Web application, you can optionally delete the content databases and the IIS Web sites. If you delete the content databases, all site content contained within them is deleted. If you delete the IIS Web sites, all IIS metabase entries that refer to the Web application are also deleted. If you only delete the Web application and not the content databases and the IIS Web sites, the content databases and IIS Web sites can be reused by another Web application.
Typically, you would delete a Web application for maintenance purposes or if you are rearchitecting the server farm.
If you are hosting content or applications other than SharePoint content on the IIS Web site that is hosting the Web application, you might want to consider not removing the IIS Web sites. Also, if you are performing maintenance work, you probably want to keep the IIS Web sites. However, if you are only hosting SharePoint content on the IIS Web site or if you plan to do a complete restructuring, then you would want to delete the IIS Web site.
If you want to delete the Web application temporarily, for example, to create the Web application under a different application pool, you might consider not removing the content databases. You can then recreate the Web application with the desired settings and reattach the existing content databases. If you delete the content databases, your content is gone forever unless you have a backup to restore the content databases.
Before you perform these procedures, confirm that:
- You know the implications of deleting the IIS Web site and the content databases should you chose this option.
- You have made a backup of the Web application that you plan to delete if, for some reason, you want to restore the deleted Web application. For more information, seeBack up a Web application (SharePoint Foundation 2010).
- If you have User Account Control (UAC) turned on in Windows, and you use Windows PowerShell to delete a Web application, you must right-click the SharePoint 2010 Management Shell and select Run as administrator.
To delete a Web application by using Central Administration
- Verify that you have the following administrative credentials:
- To delete 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 delete, and on the ribbon, click Delete and then Delete Web Application.
- On the Delete Web Application page, in the Delete Options section, under Delete content databases select Yes if you want to delete the content databases associated with the Web application. Otherwise, select No to keep the content databases.
- Under Delete IIS Web sites, select Yes to delete the Web application and the associated IIS Web site. Otherwise, select No to remove only the association of the IIS Web site with the Web application.
If your IT environment requires the use of a database administrator (DBA) for database creation and management, you might need to contact your DBA to delete the content databases for the Web application. For information about deploying in an environment that uses DBA-created databases, see Deploy by using DBA-created databases (SharePoint Foundation 2010).
|
To delete 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. If you want to delete the content databases associated with this Web application, you also need to have the SharePoint_Shell_Access role within these content databases.
- 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 -Confirm
No comments:
Post a Comment