UWF_Overlay

UWF(통합 쓰기 필터) 오버레이의 현재 크기를 포함하고 오버레이 크기에 대한 위험 및 경고 임계값을 관리합니다.

구문

class UWF_Overlay {
    [key]  string Id;
    [read] UInt32 OverlayConsumption;
    [read] UInt32 AvailableSpace;
    [read] UInt32 CriticalOverlayThreshold;
    [read] UInt32 WarningOverlayThreshold;

    UInt32 GetOverlayFiles(
        [in] string Volume,
        [out, EmbeddedInstance("UWF_OverlayFile")] string OverlayFiles[]
    );
    UInt32 SetWarningThreshold(
        UInt32 size
    );
    UInt32 SetCriticalThreshold(
        UInt32 size
    );
};

구성원

다음 표에는 이 클래스에 속하는 모든 메서드와 속성이 나열되어 있습니다.

메서드 Description
UWF_Overlay.GetOverlayFiles UWF 오버레이에 캐시된 볼륨의 파일 목록을 반환합니다.
UWF_Overlay.SetWarningThreshold UWF 오버레이의 크기를 모니터링하기 위한 경고 임계값을 설정합니다.
UWF_Overlay.SetCriticalThreshold UWF 오버레이의 크기를 모니터링하기 위한 위험 경고 임계값을 설정합니다.

속성

속성 데이터 형식 한정자 설명
Id 문자열 [key] 고유한 ID입니다. 항상 UWF_Overlay로 설정됩니다.
OverlayConsumption UInt32 [read] UWF 오버레이의 현재 크기(메가바이트)입니다.
AvailableSpace UInt32 [read] UWF 오버레이에 사용할 수 있는 사용 가능한 공간의 양(MB)입니다.
CriticalOverlayThreshold UInt32 [read] 중요한 임계값 크기(메가바이트)입니다. UWF 오버레이 크기가 이 값에 도달하거나 초과하면 UWF는 중요한 임계값 알림 이벤트를 보냅니다.
WarningOverlayThreshold UInt32 [read] 경고 임계값 크기(메가바이트)입니다. UWF 오버레이 크기가 이 값에 도달하거나 초과하면 UWF는 경고 임계값 알림 이벤트를 보냅니다.

다음 예제에서는 PowerShell 스크립트에서 WMI 공급자를 사용하여 UWF를 사용하는 방법을 보여 줍니다.

$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"

# Function to set the Unified Write Filter overlay warning threshold

function Set-OverlayWarningThreshold($ThresholdSize) {

# Retrieve the overlay WMI object

    $OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;

    if(!$OverlayInstance) {
        "Unable to get handle to an instance of the UWF_Overlay class"
        return;
    }

# Call the instance method to set the warning threshold value

    $retval = $OverlayInstance.SetWarningThreshold($ThresholdSize);

# Check the return value to verify that setting the warning threshold is successful

    if ($retval.ReturnValue -eq 0) {
        "Overlay warning threshold has been set to " + $ThresholdSize + " MB"
    } else {
        "Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
    }
}

# Function to set the Unified Write Filter overlay critical threshold

function Set-OverlayCriticalThreshold($ThresholdSize) {

# Retrieve the overlay WMI object

    $OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;

    if(!$OverlayInstance) {
        "Unable to get handle to an instance of the UWF_Overlay class"
        return;
    }

# Call the instance method to set the warning threshold value

    $retval = $OverlayInstance.SetCriticalThreshold($ThresholdSize);

# Check the return value to verify that setting the critical threshold is successful

    if ($retval.ReturnValue -eq 0) {
        "Overlay critical threshold has been set to " + $ThresholdSize + " MB"
    } else {
        "Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
    }
}

# Function to print the current overlay information

function Get-OverlayInformation() {

# Retrieve the Overlay WMI object

    $OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;

    if(!$OverlayInstance) {
        "Unable to get handle to an instance of the UWF_Overlay class"
        return;
    }

# Display the current values of the overlay properties

    "`nOverlay Consumption: " + $OverlayInstance.OverlayConsumption
    "Available Space: " + $OverlayInstance.AvailableSpace
    "Critical Overlay Threshold: " + $OverlayInstance.CriticalOverlayThreshold
    "Warning Overlay Threshold: " + $OverlayInstance.WarningOverlayThreshold
}

# Examples of using these functions

"`nSetting the warning threshold to 768 MB."
Set-OverlayWarningThreshold( 768 )

"`nSetting the critical threshold to 896 MB."
Set-OverlayCriticalThreshold( 896 )

"`nDisplaying the current state of the overlay."
Get-OverlayInformation

설명

UWF로 보호되는 시스템에 대해 하나의 UFW_Overlay 인스턴스만 존재합니다.

요구 사항

Windows 버전 지원됨
Windows Home No
Windows Pro No
Windows Enterprise Yes
Windows Education Yes
Windows IoT Enterprise