2

I'm trying to find the specific time that my app pool is set to recycle on my server using PowerShell. I know it's set to recycle at 1 AM daily on the test server that I'm looking at. I'm running:

Get-ItemProperty -Path IIS:\AppPools\AppPool -Name recycling.periodicRestart.time

and the value that's showing is 00:00:00

For testing purposes, I attempted to run:

Set-ItemProperty -Path IIS:\AppPools\AppPool -Name recycling.periodicRestart.time -Value 3.00:00:00

I checked to see how this changed. The "Specific Time(s)" field still reads 1:00 AM, but now the "Regular Time Intervals (in minutes)" is set to 4320 minutes. So apparently I'm looking at the wrong value... Any idea how I can see the value in the "Specific Time" field?

Christopher Cass
  • 817
  • 4
  • 19
  • 31

1 Answers1

5

Here you go:

Set-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.schedule -Value @{value = '03:00:00'}

Get it with:

Get-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.schedule.collection
Ben Richards
  • 3,437
  • 1
  • 14
  • 18