Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS: how to undeploy/delete/remove a webapp from command line?

Suppose there's a webapp deployed on local IIS server. When I need to remove/undeploy it, I can go to IIS Manager, right-click on the app, and then select "Delete application and content" - et voila. But, I need to do the same from the command line - how? It can be assumed that the name of the application is known.

Maybe this can be done via MSDeploy somehow?

like image 573
Riddler Avatar asked Dec 17 '10 10:12

Riddler


People also ask

How do I delete a website from IIS?

Click Start > Control Panel > Administrative Tools > Internet Information Services. In the Connections pane, expand the machine's name, then expand Sites, then Default Web Site (or your web site, if renamed). Right-click acuxbis and select Remove from the popup menu.

How do I remove an app from App Pool IIS?

1. In the View List under Server Configuration, click Internet Information Services. 2. In the Application Pools explorer, right-click the application pool and click Delete.


1 Answers

If you just want to remove the application from the Web Site in IIS without physically deleting the files (like msdeploy does) or if you don't have the WebDeploy-extension installed, you can use the following command:

C:\Windows\System32\inetsrv\appcmd.exe delete app "Default Web Site/MyAppName"
like image 51
Stephan Bauer Avatar answered Oct 16 '22 17:10

Stephan Bauer