Ask A Question

View Question

I am using IIS::Ensure-Application to create application in IIS. I need to assign App Pool to the newly created application but there is no such option here to provide App Pool data. Please let me know how to assign App pool to an application in IIS using BuildMaster?

Product: BuildMaster
Version: 5.6.11

Hi Megha,

Ensure application dont have selection of appPool right now, may be you can try create a powershell like below might solve your problem for time being.


Import-Module WebAdministration

#gets the iis application name
$iisApp = get-item 'IIS:\Sites\Default Web Site'

if((Test-Path ("IIS:\AppPools" + $iisAppPoolName)) -and (Test-Path ("IIS:\Sites\Default Web Site" + $iisAppName)))
#set the app pool to the application
#Set-ItemProperty IIS:\Sites'Default Web Site'$iisAppName -Name applicationpool -Value $iisAppPoolName
Set-ItemProperty -path IIS:\Sites'Default Web Site'$iisAppName -name applicationPool -value $iisAppPoolName -Force

  Write-Host $iisAppPoolName“ configured to web site: “$iisAppName

Write-Host "The App Pool/site does not exists" -ForegroundColor Yellow
Write-Error "Failed to add application to the app pool"


Answer Question