Freigeben über


Get the application pool for a web application using the IIS7 PowerShell snap-in

 

Recently I was playing around with the IIS 7 PowerShell snap-in and I found a simple way of obtaining what application pool a given web application is running under.

The code is pretty simple and to do this, run from a standard PowerShell console:

##Import the IIS Admin module – you will need this!!!

Import-Module WebAdministration

 

##Get the Application Pool for a given website – Replace ‘Default Web Site’ with your site and you find what app pool the site is running under:

Get-Item "IIS:\Sites\Default Web Site"| Select-Object applicationPool

 

Although this isn't really SharePoint related, it will save you heaps of time rather than having to fire up the UI  Smile

 

More details can be found here at the following links:

https://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-powershell-snap-in/

https://learn.iis.net/page.aspx/430/powershell-snap-in-navigating-the-iis-snap-in-namespace/