Alex Rivera | Logout

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

Asked 2010-12-17T10:48:32.140
21

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?

Edit
Report

1 Answer

20

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"
answered 2011-07-21T13:51:30.657

Your Answer