IIS Application pool PID

I just discovered that you can also find this in the UI for IIS 7. Select your web server node and open "Worker Processes". This will show the name of each Application Pool along with its Process ID and utilization details.


On Windows Server 2008 this has changed.

in %systemroot%\system32\inetsrv you find the appcmd.exe

using

appcmd list wp

you get a list of all the worker processes and which apppool they are serving.

You might need to run this in a shell with Administrator privileges.


If you are just using command line to figure it out ad-hoc you can do this too:

The script is already placed in systemroot\system32 on Windows Server 2003 so simply go to your Command Prompt and type in iisapp.vbs (the .vbs is optional) and you'll have an instant list of all the App Pool information you've always wanted to know. You may need to type cscript iisapp.vbs if CScript isn't your default WSH script host.

Let's see an example of the output:

W3WP.exe PID: 1468 AppPoolId: AppPoolForSite1.com
W3WP.exe PID: 3056 AppPoolId: AppPoolForSite2.com
W3WP.exe PID: 1316 AppPoolId: AppPoolForSite3.com

Direct from the horse's mouth, Microsoft documents this.