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.
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
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
}