Pages

How To Recycle IIS Application Pool Manually via DOS Command ?

As a .NET programmer and an avid user of the Global Assembly Cache when dealing with SharePoint one of the things that I have to use most to test my solutions is to recycle the application pool, so that I can put my newly created DLLs and test them.

I use a lot WSPBuilder for this task, but I always wondered : How can I recycle the application pool via command prompt ?

In case you ever wonder the same and still don’t know how to do it, here’s how:

restart-application-pool-script-2

the cscript command is pretty neat. And mostly the Microsoft Platform applications have a .vbs file assigned to them, so give it a try and try some other cool stuff in other apps.

restart-application-pool-script-1

See you later,

-Edge

3 comments:

Tobin Titus said...

Also:
appcmd recycle apppool "MySharepointAppPool"

appcmd.exe can be found in the \windows\system32\inetsrv\ directory.

Jeremy Thake said...

WSPBuilder has built in tools to do that application recycle. Should check out the tools on the @SPDevWIki

http://www.sharepointdevwiki.com/display/public/Other+SharePoint+Development+Tools

Has a link to @harbars application pool recycle tool too!

blog da scarlet said...

yes Jeremy, wspb it is indeed a very good tool, but the post was intended to display a 'command line option'.

mostly the sharepoint people already know the WSPBuilder anyway :)

thanks for the comment and take a look at @superedge