简体   繁体   English

使用PowerShell获取IIS的特定回收时间

[英]Get Specific Recycling Time For IIS With PowerShell

I'm trying to find the specific time that my app pool is set to recycle on my server using PowerShell. 我正在尝试查找将应用程序池设置为使用PowerShell在服务器上回收的特定时间。 I know it's set to recycle at 1 AM daily on the test server that I'm looking at. 我知道它将每天凌晨1点在要查看的测试服务器上进行回收。 I'm running: 我在跑:

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

and the value that's showing is 00:00:00 并且显示的值为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. “特定时间”字段仍显示为1:00 AM,但是现在“常规时间间隔(以分钟为单位)”设置为4320分钟。 So apparently I'm looking at the wrong value... Any idea how I can see the value in the "Specific Time" field? 因此,显然我正在查看错误的值...知道如何在“特定时间”字段中看到该值吗?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM