Kill all instance of IIS web server with a single Command Line

When developing with Visual Studio, when you attach to the process or use the inner server (Cassini) a new process is launched. This one doesn’t always stop when you stop debugging. You can have a list of process that is running and sometime this can cause problem when debugging because you are not accessing the right one.

To close those server, you can check in the task bar, at the right side, in the tray, and you will notice a little icon with a paper and a mechanism wheel. This is what you need to kill. You can right click and closing. The problem is that if you forget to do it every time, after some time you will have a lot of them.

To be quick, you can use a command line that will close them all for you.

taskkill /f /im WebDev.*

Taskkill with a lot of WebServer.exe

This command line give to the Windows the right to kill a process by forcing it (/f) to close all process name (/im) that start with WebDev.

If you like my article, think to buy my annual book, professionally edited by a proofreader. directly from me or on Amazon. I also wrote a TypeScript book called Holistic TypeScript

1 thought on “Kill all instance of IIS web server with a single Command Line

  1. Pingback: Patrick Desjardins' Blog » The breakpoint will not currently be hit. No symbols have been loaded for this document

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.