How to tell which Application pool an IIS worker process belongs to

Recently speaking at a conference where I was presenting an IIS crash course, several attendees came up to me after the session and asked how they could tell which IIS worker process belonged to which application pool. This information is presented in the graphical task manager, but is tricky to find using PowerShell.

Because so many folks were curious, I decided to share with everyone.  Here ya go!

PS> Get-WmiObject –class win32_process -filter 'name="w3wp.exe"' | Select-Object –Property Name, ProcessId, @{n='AppPool';e={$_.GetOwner().user}} 

IIS and PowerShell combined rock!

The Inadvertent IIS administrator

Jason Helmick
Director of PowerShell Technologies
Interface Technical Training

Posted in PowerShell | Posted in , , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">