Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to audit the application pools on an IIS6 server, I want to check which websites relate to each application pool and the .NET version they are running. How can I do this without manually going though the interface and looking at each one in turn?

share|improve this question

Use iisapp.vbs to list app pools:


Unfortunately, unlike in IIS7, the app pools have no idea which .NET version they are running, they are just loading the filter requested by the site, so you have to iterate through the sites and pull the info. This StackOverflow answer has a suggested script for walking the web sites and listing their app pool and .NET versions.

(Script credit to @Kev at StackOverflow)

# Walk sites
$allsites = ([adsi]"IIS://Localhost/W3SVC").children | where { $_.SchemaClassName -eq "IIsWebServer" }
$pools = @()

foreach($site in $allsites)
  $path = "IIS://Localhost/W3SVC/" + $site.Name + "/root"
  $siteRoot = [adsi]$path
  $sitePool = $siteRoot.AppPoolId

  $aspx = $siteRoot.ScriptMaps | where { $_.StartsWith(".aspx") }

  if( $aspx.Contains("v1.1")) {
    $runtime = "1.1"
  } elseif ($aspx.Contains("v2.0")) {
    $runtime = "2.0"
  } elseif( $aspx.Contains("v4.0")) {
    $runtime = "4.0"
  } else {
    $runtime = "Unknown"

  $v =  @{AppPool = $siteRoot.AppPoolId; RunTime = $runtime; SiteId = $site.Name}
  $pools += $v

$pools | Sort-Object { $_.AppPool } | % { Write-Host $_.AppPool $_.SiteId $_.RunTime }
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.