IISRESET light

Note: This blog entry used to be on my old blog. I'm about to shut it down so I thought I replicate some of the content here.
Many IIS customers use IISRESET to get IIS back into a vanilla state. IISRESET is a pretty heavy hammer however and not needed most of the time - why would you restart FTP, WAS and W3SVC and all worker processes just because one of your web applications is locking a DLL or some content. Recycling the Application Pool causing the problem is usually enough. If you don't know which Application Pool is making the trouble you can recycle all of them. Here is how you do it with APPCMD:

Recycling the Default Application Pool:

%windir%\system32\inetsrv\appcmd recycle AppPool DefaultAppPool 

You can use the APPCMD piping feature to recycle all Application Pools:

%windir%\system32\inetsrv\appcmd list apppools /xml | appcmd recycle apppools /in 

Save this command as "%windir%\system32\IISPOOLRESET.BAT" and use it instead of using IISRESET.EXE. It probably takes some time to overcome the muscle memory of typing IISRESET<enter>.

No Comments