You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用PowerShell移除IIS应用程序池的所有定时重启时间?

移除IIS应用程序池定时重启计划的所有元素

要移除应用程序池默认配置中的所有定时重启计划,你可以使用Remove-WebConfiguration命令直接删除对应路径下的所有add节点:

Remove-WebConfiguration "/system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart/schedule/add"

针对单个应用程序池的操作

如果需要移除特定应用程序池的定时重启计划,只需将路径中的applicationPoolDefaults替换为目标应用程序池的名称:

Remove-WebConfiguration "/system.applicationHost/applicationPools/applicationPools/[name='YourAppPoolName']/recycling/periodicRestart/schedule/add"

验证删除结果

执行完删除命令后,你可以用自己提供的命令验证是否所有定时重启计划已被移除:

Get-WebConfiguration "/system.applicationHost/applicationPools/applicationPoolDefaults/recycling/periodicRestart/schedule/add" | Select-Object value

若命令无输出,说明所有定时重启计划已成功移除。

内容的提问来源于stack exchange,提问作者Mayur Asodariya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 07:35:56