2017-03-17 5 views
0

Powershell 5.0.10586.117을 IIS 7.5에서 사용하고 있습니다.Powershell을 사용하여 IIS 응용 프로그램 풀의 "주기적으로 다시 시작한 재활용 값"을 얻는 방법

Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection 

을 실행 나는 즉

DefaultAppPool 
value   : 03:00:00 
Attributes  : {Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute} 
ChildElements : {} 
ElementTagName : add 
Methods  : 
Schema   : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema 

그러나 나는 단지 을 얻고 싶은받을 수 있습니다. 그러나

Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection 

"찾을 수 없음"오류 메시지와 함께 실패합니다.

은 어떻게 얻을 수 있습니까? 처음에 사용을

Import-Module WebAdministration 

을 재현 할 수 있다는 위해서

.

답변

0

귀하의 예를 당 명령이 작동, 당신은이 같은 값 속성을 얻을 수있는 경우 : 오류 유무에 관계없이 공유 당신없이 "을 (를) 찾을 수 없습니다"라는 오류 메시지가 왜

(Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection).Value 

내가 진단 할 수 있습니다 $ singleAppPool에있는 내용을 알고 있거나 서버의 유효한 항목인지 확인합니다.