Today I had an issue whilst deploying some Sharepoint code locally where the “World Wide Web Publishing” (W3SVC) service had hung in the Stopping state.
This was very annoying as I couldn’t identify the process in Task Manager to just end task it, this was leaving me with only one option – reboot. Going in to the properties of the service simply tells me that the service is started with “C:\Windows\system32\svchost.exe -k iissvcs” so I know that the process is called svchost.exe giving me a choice:
As you can see I have rather a lot of svchost and killing them randomly is likely to end in tears, thus I must be more scientific and execute tasklist /svc
This helpfully tells me the ProcessID (PID) together with the service name (W3SVC). I can now re-open Task Manager, go to View->Select Columns and select PID. This allows me to easily identify the process and end it!

[...] I have a habit of opening lots of interesting/promising links in a new tab and then a little later I can’t remember where I found the link. Pretty sure I found this one through the excellent stackoverflow.com (or it’s twin serverfault.com): Killing the right svchost.exe process [...]
Pingback by Planet Dan occasional mumbles » What is SVCHost.exe - which one does what? — Monday 29 Jun 2009 @ 19:45
[...] I have a habit of opening lots of interesting/promising links in a new tab and then a little later I can’t remember where I found the link. Pretty sure I found this one through the excellent stackoverflow.com (or it’s twin serverfault.com): Killing the right svchost.exe process [...]
Pingback by What is SVCHost.exe – which instance does what? « Mumbles on Planet Dan — Tuesday 30 Jun 2009 @ 19:04