1

By default a new app pool will want to recycle itself on a regular time interval every 1740 minutes.

I want to clear this setting so the IIS never recycles it.

2 Answers 2

4

This will clear the time interval setting on the app pool

Import-Module WebAdministration
$pool = "IIS:\AppPools\mywebapp"
Set-ItemProperty $pool -Name Recycling.periodicRestart.time -Value 0.00:00:00
0

Further to the selected answer. For those working with multiple IIS sites, here's a script that will disable the 'regular time interval' refresh for all sites that have it enabled.

Import-Module WebAdministration

$sites = Get-ChildItem 'IIS:\AppPools\' | Where-Object { $_.recycling.periodicRestart.time.TotalMilliseconds -gt 1 }
foreach ($s in $sites) {
  Set-ItemProperty $s.PSPath -Name Recycling.periodicRestart.time -Value 0.00:00:00
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .