Set the ApplicationPool scheduled recycling

Set the ApplicationPool scheduled recycling

# Clean all scheduled recycles 
Clear-WebConfiguration /system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart/schedule

# Add periodic recycle (06h30)
Add-WebConfiguration /system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart/schedule -Value (New-TimeSpan -h 6 -m 30)

# Check if the recycle was added
Get-WebConfiguration /system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart/schedule/add | Select Value

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top