Seems like when I do IISRESET from command prompt, I'm getting the restart error about 90% of the time. Running IIS7 on Win 2008. But I've seen the same thing with IIS6 and Win2003. Running IISRESET a second time seems to start everything, or I could restart manually - but I'm curious if I can get it to work consistently with just ONE IISRESET.
Attempting stop...
Internet services successfully stopped
Attempting start...
Restart attempt failed.
The IIS Admin Service or the World Wide Web Publishing Service, or a service dep
endent on them failed to start. The service, or dependent services, may had an
error during its startup or may be disabled.
C:\Users\btinstall>iisreset
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
The message says "The service, or dependent services, may had an error during its startup or may be disabled." This may happen in IIS 7 / 7.5 because WAS (Windows Process Activation Service) may be taking some time to refresh.
The best way to make sure your IIS related services restarts successfully is to use "net stop W3SVC" and "net start W3SVC" as an Administrator.
Interesting, how many websites does your server have? And how long does the IISReset take the first time and second time? (This may be something that MSFT can fix in IISReset ... for scenarios when WAS takes a long time to start.)
Feel free to dump this in the IIS.NET forums, so the product team can take a look. Here's the link: http://forums.iis.net/default.aspx?GroupID=41