UWF_Filter

UWF(Unified Write Filter)를 사용하거나 사용하지 않도록 설정하고, UWF에 대한 구성 설정을 다시 지정하고, 디바이스를 종료하거나 다시 시작합니다.

구문

class UWF_Filter{
    [key]  string Id;
    [read] boolean CurrentEnabled;
    [read] boolean NextEnabled;
    UInt32 Enable();
    UInt32 Disable();
    UInt32 ResetSettings();
    UInt32 ShutdownSystem();
    UInt32 RestartSystem();
};

구성원

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

메서드

메서드 Description
UWF_Filter.Enable 다음에 다시 시작할 때 UWF를 사용하도록 설정합니다.
UWF_Filter.Disable 다음에 다시 시작할 때 UWF를 사용하지 않도록 설정합니다.
UWF_Filter.ResetSettings UWF 설정을 설치 시 캡처된 orig inal 상태로 복원합니다.
UWF_Filter.ShutdownSystem 오버레이가 가득 찬 경우에도 UWF로 보호되는 시스템을 안전하게 종료합니다.
UWF_Filter.RestartSystem 오버레이가 가득 찬 경우에도 UWF로 보호되는 시스템을 안전하게 다시 시작합니다.

속성

속성 데이터 형식 한정자 설명
ID 문자열 [key] 고유한 ID입니다. 항상 UWF_Filter
CurrentEnabled Boolean [read] 현재 세션에 대해 UWF가 사용하도록 설정되었는지 여부를 나타냅니다.
NextEnabled Boolean [read] 다음에 다시 시작한 후 UWF가 사용하도록 설정되었는지 여부를 나타냅니다.

설명

UWF에 대한 구성 설정을 변경하려면 관리자 계정을 사용해야 합니다. 어떤 종류의 계정이든 계정을 가진 사용자가 현재 구성 설정을 읽을 수 있습니다.

예제

다음 예제에서는 PowerShell 스크립트에서 WMI 공급자를 사용하여 UWF를 사용하거나 사용하지 않도록 설정하는 방법을 보여 줍니다.

PowerShell 스크립트는 UWF를 사용하거나 사용하지 않도록 설정하는 데 도움이 되는 세 가지 함수를 만듭니다. 그런 다음 각 함수를 사용하는 방법을 보여 줍니다.

첫 번째 함수 Disable-UWFUWF_Filter에 대한 WMI 개체를 검색하고 Disable() 메서드를 호출하여 다음 디바이스가 다시 시작된 후에 UWF를 사용하지 않도록 설정합니다.

두 번째 함수 Enable-UWFUWF_Filter에 대한 WMI 개체를 검색하고 Enable() 메서드를 호출하여 다음 디바이스가 다시 시작된 후에 UWF를 사용하도록 설정합니다.

세 번째 함수 Display-UWFStateUWF_Filter 개체의 속성을 검사하고 UWF_Filter에 대한 현재 설정을 출력합니다.

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

# Create a function to disable the Unified Write Filter driver after the next restart.
function Disable-UWF() {

# Retrieve the UWF_Filter settings.
    $objUWFInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Filter;

    if(!$objUWFInstance) {
        "Unable to retrieve Unified Write Filter settings."
        return;
    }

# Call the method to disable UWF after the next restart.  This sets the NextEnabled property to false.

    $retval = $objUWFInstance.Disable();

# Check the return value to verify that the disable is successful
    if ($retval.ReturnValue -eq 0) {
        "Unified Write Filter will be disabled after the next system restart."
    } else {
        "Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
    }
}

# Create a function to enable the Unified Write Filter driver after the next restart.
function Enable-UWF() {

# Retrieve the UWF_Filter settings.
    $objUWFInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Filter;

    if(!$objUWFInstance) {
        "Unable to retrieve Unified Write Filter settings."
    return;
    }

# Call the method to enable UWF after the next restart.  This sets the NextEnabled property to false.

    $retval = $objUWFInstance.Enable();

# Check the return value to verify that the enable is successful
    if ($retval.ReturnValue -eq 0) {
        "Unified Write Filter will be enabled after the next system restart."
    } else {
        "Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
    }
}

# Create a function to display the current settings of the Unified Write Filter driver.
function Display-UWFState() {

# Retrieve the UWF_Filter object
    $objUWFInstance = Get-WmiObject -Namespace $NAMESPACE -Class UWF_Filter;

    if(!$objUWFInstance) {
        "Unable to retrieve Unified Write Filter settings."
        return;
    }

# Check the CurrentEnabled property to see if UWF is enabled in the current session.
    if($objUWFInstance.CurrentEnabled) {
        $CurrentStatus = "enabled";
    } else {
        $CurrentStatus = "disabled";
    }

# Check the NextEnabled property to see if UWF is enabled or disabled after the next system restart.
    if($objUWFInstance.NextEnabled) {
        $NextStatus = "enabled";
    } else {
        $NextStatus = "disabled";
    }
}

# Some examples of how to call the functions

Display-UWFState

"Enabling Unified Write Filter"
Enable-UWF

Display-UWFState

"Disabling Unified Write Filter"
Disable-UWF

Display-UWFState

요구 사항

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