[英]Get the value of 'specific Times' array (IIS) from powershell
我正在嘗試從IIS檢索特定時間值。 但是我得到了對配置元素的某種引用。
這用於Microsoft Internet信息服務(版本10.0.14393.0)。
我試過了
$itemsInIis = Get-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.schedule.collection
Write-Host "Times present in IIS: [$itemsInIis]."
我找回Microsoft.IIs.PowerShell.Framework.ConfigurationElement
而不是實際值。 我應該如何檢索諸如00:00:00的時間
不確定在這里缺少什么來檢索數組中的實際時間。
您將返回一個ConfigurationElements數組,每個數組的value
類型為TimeSpan
。 嘗試這樣的事情:
$itemsInIis = (Get-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.schedule.collection).value -F 'hhmmsss'
Write-Host "Times present in IIS: [$itemsInIis]."
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.