Showing posts with label Delete web application. Show all posts
Showing posts with label Delete web application. Show all posts

Wednesday, 10 October 2012

How to remove web application using PowerShell 2010


Method 1:

Remove-SPWebApplication -Identity http://ukreddy:6789

This cmdlet will ask for user's confirmation.


Remove-SPWebApplication -Identity http://ukreddy:6789 -Confirm:$false

This cmdlet won't ask for user's confirmation.



This cmdlet permanently removes the Web application at http://ukreddy:6789. This command does not remove the content databases or the IIS Web site.

Method 2:


Remove-SPWebApplication -Identity http://ukreddy:6789 -DeleteIISSite -RemoveContentDatabase


This cmdlet will ask for user's confirmation.


Remove-SPWebApplication -Identity http://ukreddy:6789  -Confirm:$false -DeleteIISSite -RemoveContentDatabase

This cmdlet won't ask for user's confirmation.




This cmdlet permanently removes the Web application at http://ukreddy:6789. This command also remove the content databases or the IIS Web site.