Recycle An Individual Application Pool From The Command Line

7 July, 2010

Recycle An Individual Application Pool From The Command Line

When developing SharePoint artifacts which live in the GAC you have the following options to get your new release in as part of the development process:

  1. Build your installation package and upgrade it
  2. Put the new dll in the GAC and run iisreset
  3. Put the new dll in the GAC and recycle the SharePoint application pool

As it is an iterative process when you are developing this happens a lot, so ideally you need a process which is as quick as possible. 1 & 2 take the longest time so you should aim to use 3.

Luckily there is a command line command which will recycle individual application pools, which will be quicker than using the IIS administration tool. The command is

C:windowsSystem32inetsrvappcmd.exe recycle apppool “SharePoint – 80”

Where you replace “SharePoint – 80” with the name of your application pool.

Of course when releasing to a live server you should always go down the proper installation package upgrade, this tip is purely for development purposes on your development server.

There’s a lot more you can do with appcmd – it’s a utility for making configuration changes to IIS so pretty much anything you can do through the IIS MMC snap in can be done via it. There are more details about appcmd on Technet or you can run

C:windowsSystem32inetsrvappcmd.exe /?

to get help details.

Note: appcmd is for IIS7 not IIS6.

Richard Willis

Written by

Copyright © 2024 SalamanderSoft Limited