[英]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.