Wors World
All About Wor

Restarting An App Pool From The Command Line

Working my way through a SharePoint development, I had cause to refer to the book "Inside Microsoft Windows SharePoint Services 3.0" written by Ted Pattison & Daniel Larson.
 
Whil looking up the info I needed I saw a section on page 33 entitles "Restarting an Application Pool".  This section describes how using iisreset restarts all of the processes running under IIS and how using the command line:
 
cscript iisapp /a "DefaultAppPool" – where DefaultAppPool is an app pool on your server
 
will reset only that process thereby preserving all of the other processes and saving time and reources.
 
I gave this a go and found that it didn’t quite work, producing output like this:
 
The following W3WP.exe processes are serving AppPool: DefaultAppPool
W3WP.exe PID: xxxx
 
The actual command required is cscript iisapp /a "DefaultAppPool" /r which resets only the process you’re interested in (in a fraction of the time of iisreset) and produces output like this:
 
Connecting to server …Done.
Application pool ‘DefaultAppPool‘ recycled successfully.
 
Later editions of the book (I have a 2007 edition) may have this fixed.
Advertisement

No Responses to “Restarting An App Pool From The Command Line”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: