0 Comments

Handy script that I frequently use to recycle IIS app pool for the various sites I maintain.

[sourcecode language='powershell'  padlinenumbers='true']
param(
    [string]$poolName
)

Write-Output $poolName
if(!$poolName)
{
    Write-Error "No AppPool name provided."
    return
}

$appPool = Get-IISAppPool -Name $poolName

if(!$appPool)
{
    Write-Error "No such apppool"
    return
}
$appPool.Recycle() 
[/sourcecode]

capture20161014154403949