繁体   English   中英

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

[英]Get Specific Recycling Time For IIS With PowerShell

我正在尝试查找将应用程序池设置为使用PowerShell在服务器上回收的特定时间。 我知道它将每天凌晨1点在要查看的测试服务器上进行回收。 我在跑:

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

并且显示的值为00:00:00

出于测试目的,我尝试运行:

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

我检查了一下情况。 “特定时间”字段仍显示为1:00 AM,但是现在“常规时间间隔(以分钟为单位)”设置为4320分钟。 因此,显然我正在查看错误的值...知道如何在“特定时间”字段中看到该值吗?

干得好:

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

通过以下方式获取:

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