簡體   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