# IIS Process ID for pool

How do you find out which process in the task manager belongs to what IIS app pool.

-
add comment

## 6 Answers

Use SysInternal's Process Explorer - It will show the command line for the proces, which shows the AppPool Name.

-
add comment

Run CMD as Administrator, run C:\Windows\System32\Inetsrv\appcmd.exe LIST WP

-
add comment
c:\windows\system32\cscript.exe c:\windows\system32\iisapp.vbs

-
this appears to be an IIS 6 only script. –  Doug Luxem May 23 '11 at 18:54
add comment

Assuming IIS6, the best way is to use iisapp.vbs plus Task Manager. iisapp.vbs maps the app pool id to the PID (which Task Manager doesn't do), but Task Manager gives you the real-time CPU and memory usage. You can run iisapp simply by typing 'iisapp' from the command prompt. In Task Manager make sure to add the PID column since it's not there by default on a new machine.

In IIS7 you would use "appcmd list wp" instead of iisapp. For that you'll need to update your path or navigate to it. The full command that will work is: "c:\windows\system32\inetsrv\appcmd list wp"

-
add comment

If I'm not mistaken, you can go into the Component Services management console, expand My Computer, select the Running Processes node in the left pane and you should see a list of running processes for each web sites application pool and their PID numbers.

-
add comment

Install the IIS "Debug Diagnostic Tool".

http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

Run it and look in the Processes tab. Look in the "Web application pool name" column.

-
add comment