Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am an admin on the box and would like to stop/start a certain app pool without having to log into the box.

Is there a command line to do this task?

share|improve this question
up vote 3 down vote accepted

The following command does it, if you're on the machine. Now, this is not a remote command. But if you have CIFS open to the webserver, you can do it with PSEXEC. If you can't/don't want to RDP or PSEXEC to the server, you could also call it via telnet or SSH if you have those protocols enabled/installed.

C:\WINDOWS\system32>iisapp.vbs /?
Description: list IIS application pools and associated worker processes.
             Recycle application pools.

Syntax: IIsApp.vbs [{ /a <app_pool_id> | /p <pid> } [/r] ]


Value              Description
/a <app_pool_id>   Specify an application pool by name. Surround
                   <app_pool_id> with quotes if it contains spaces.
                   If used alone without an accompanying action,
                   IIsApp.vbs will report PIDs of currently running
                   w3wp.exe processes serving pool <app_pool_id>.
/p <pid>           Specify a process by process ID. If used alone
                   without an accompanying action, IIsApp.vbs will
                   report the AppPoolId of the w3wp process specified
                   by <pid>. When a PID is specified with /r, that PID
                   is mapped to an application pool and the action is
                   taken upon the application pool. If a PID is given
                   for a web garden, i.e. an application pool served
                   by more than one w3wp, then all w3wp's for that
                   application pool will be acted upon.
/r                 Recycles the application pool.

DEFAULT: no switches will print out the PID and AppPoolId.
share|improve this answer
Good stuff here! +1 – Campo Jun 2 '10 at 20:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.