Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function CreateWebApplicationPool {
Param([string]$name)
Begin {
Push-Location
}
Process {
Set-Location "IIS:\AppPools\"
if ((Test-Path $name -PathType container) -eq $false) {
New-Item $name | Out-Null
Success
}
else {
Warning "The application pool already exists."
}
}
End {
Pop-Location
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.