ApplicationPool.RevertToParent 메서드1
애플리케이션 풀의 구성 값 또는 값을 기본값으로 되돌려 놓습니다.
구문
ApplicationPool.RevertToParent(PropertyName)
ApplicationPool.RevertToParent(PropertyName);
매개 변수
속성 | Description |
---|---|
PropertyName |
ApplicationPoolElementDefaults 클래스에서 지정한 기본값으로 되돌릴 애플리케이션 풀 속성의 이름을 포함하는 선택적 string 값입니다. 속성을 중첩할 수 있습니다. |
반환 값
이 메서드는 값을 반환하지 않습니다.
설명
매개 변수 없이 를 호출 RevertToParent
하면 애플리케이션 풀에 대한 모든 사용자 지정 구성 값이 제거됩니다. 원하는 동작이 아닌 경우 메서드에 대해 별도의 매개 변수가 있는 호출을 사용하여 특정 속성을 되돌리기.
예제
다음 예제에서는 의 AutoStart
속성을 ContosoAppPool
의 현재 값 false
에서 의 기본값 true
으로 되돌려 줍니다.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject( _
"winmgmts:root\WebAdministration")
' Get the application pools.
Set oAppPools = oWebAdmin.InstancesOf("ApplicationPool")
' Display the ContosoAppPool AutoStart property.
For Each oAppPool In oAppPools
If oAppPool.Name = "ContosoAppPool" Then
WScript.Echo "Application pool name: " & oAppPool.Name
WScript.Echo "AutoStart mode before revert: " & _
oAppPool.AutoStart
' Revert the AutoStart property.
oAppPool.RevertToParent("AutoStart")
' Refresh the oAppPool object variable.
oAppPool.Refresh_
' Display the changed property.
WScript.Echo "AutoStart mode after revert: " & _
oAppPool.AutoStart
Exit For
End If
Next
' Output:
' Application pool name: ContosoAppPool
' AutoStart mode before revert: False
' AutoStart mode after revert: True
요구 사항
형식 | Description |
---|---|
클라이언트 | - Windows Vista의 IIS 7.0 - Windows 7의 IIS 7.5 - Windows 8의 IIS 8.0 - WINDOWS 10 IIS 10.0 |
서버 | - Windows Server 2008의 IIS 7.0 - Windows Server 2008 R2의 IIS 7.5 - Windows Server 2012의 IIS 8.0 - Windows Server 2012 R2의 IIS 8.5 - WINDOWS SERVER 2016 IIS 10.0 |
제품 | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF 파일 | WebAdministration.mof |