Recycling Application Pool at command prompt
So how do you restart an application pool manually ? I know there's many health check and perfomance option that you can configure via IIS MMC. But what if you really need to recycle it at command prompt. Well, you might think the /r flag in IisApp.vbs work. However, I just been told it's not!! (I can't verified this as I have SP1 installed) MS actually have an in-house vbs scripts called iisrecycle.vbs, I don't think I can post it here. Anyway, it's similar to this that can be found at IIS Scripting Repository.
Or get W2k3SP1, and the IisApp.vbs will works! Here's my test result:
Command Prompt -
C:\Documents and Settings\Administrator>iisapp /a DefaultAppPool /r
Connecting to server ...Done.
Application pool 'DefaultAppPool' recycled successfully.
Event Log -
Event Type: Information
Event Source: W3SVC
Event Category: None
Event ID: 1079
Time: 4:01:12 PM
An administrator has requested a recycle of all worker processes in
application pool 'DefaultAppPool'.
For more information, see Help and Support Center at
And of coz, I also make sure that the PID of the w3wp.exe changed after recycled.