Remove multiple website from IIS 7.5 Remove multiple website from IIS 7.5 powershell powershell

Remove multiple website from IIS 7.5


The Web Server (IIS) Administration Cmdlets in Windows PowerShell will help you here.

The following will remove all websites:

Import-Module WebAdministrationGet-Website | Remove-Website

This won't remove any files so that should be done separately.


Big Thanks to David Martin, but here is what I needed to do in order for it to install and work.

# Get WebAdminstration moduleAdd-PSSnapin WebAdministration -ErrorAction SilentlyContinue # Import module in order to run itImport-Module WebAdministration# Remove All Websites from IISRemove-Website -Name *

I hope this helps others.

Works with IIS 8.5 (Windows Server 2012 R2)


When installed on IIS 7.0 or later Web Deploy adds a context menu item to IIS manager called Deploy.

There are multiple actions available here one of which is the Delete action. There are two options depending on what node you have selected in IIS manager:

Web site :   Deploy >> Delete Web Site and ContentApplication: Deploy >> Delete Application and Content

For more details...please check below link

http://blogs.iis.net/richma/archive/2010/07/03/deleting-iis-web-sites-applications-and-their-content-with-web-deploy.aspx