Link to home
Create AccountLog in
Microsoft IIS Web Server

Microsoft IIS Web Server

--

Questions

--

Followers

Top Experts

Avatar of nav2567
nav2567🇺🇸

Identify app pool used by IIS site
Hello,

I have a lot of web sites on my IIS server.  If I know the name of the application pool, what is the best way to quick identify which site is using it?

Thanks

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of Paul MacDonaldPaul MacDonald🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of dfkedfke

Hi,

sorry I missread that you said you have a lot of sites.

  • create a new file calls listapppool.ps1 with the following content:


[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")

$sm = New-Object Microsoft.Web.Administration.ServerManager

foreach($site in $sm.Sites)
{
    $root = $site.Applications | where { $_.Path -eq "/" }
    Write-Output ("Site: " + $site.Name + " | Pool: " + $root.ApplicationPoolName)
}

Open in new window

  • Open an administrative command line prompt and run powershell.

  • Run the script in powershell:

.\listapppool.ps1

Open in new window

it will display all sites and their corresponding Application Pools.

Cheers

Avatar of nav2567nav2567🇺🇸

ASKER

Thanks, everyone.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

Microsoft IIS Web Server

Microsoft IIS Web Server

--

Questions

--

Followers

Top Experts

IIS is Internet Information Services, the web server included with Windows Server operating systems. All current versions are built on a modular architecture; modules can be added or removed individually so that those required for specific functionality are installed. The full installation of IIS includes HTTP, security, content, compression, caching, logging and diagnostics.