title: Get App Pool Identity for IIS in Power Shell Script
body: <p>Trying to get Application Pool Identity in IIS for a specific name, for example : <em>Test</em> </p>
  
  <p>Succeded in getting it via below code but dont want to loop through all the webapps, is there any easy of getting it by specifying the name?</p>
  
  <pre><code>Import-Module WebAdministration
  Get-WebApplication
  
  $webapps = Get-WebApplication
  $list = @()
  foreach ($webapp in get-childitem IIS:\AppPools\)
  {
      $name = "IIS:\AppPools\" + $webapp.name
      $item = @{}
      if ($webapp.name -eq 'Test')
      {        
          $item = $webapp.processModel.identityType   
          break
      }
  }
  
  
  echo $webapp.processModel.identityType
  </code></pre>