I am wondering if there is a way to enumerate the collection of applications pools (not the applications in a given pool - but the pools themselves) on the local IIS server
using System.IO;
using Microsoft.Web.Administration;
namespace AppPoolEnum
{
class Program
{
static void Main(string[] args)
{
foreach (var appPool in new ServerManager().ApplicationPools)
{
Console.WriteLine(appPool.Name);
}
}
}
}