UWF_Overlay

Contiene el tamaño actual de la superposición filtro de escritura unificada (UWF) y administra los umbrales críticos y de advertencia para el tamaño de superposición.

Sintaxis

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
    );
};

Miembros

En las tablas siguientes se enumeran todos los métodos y propiedades que pertenecen a esta clase.

Métodos Descripción
UWF_Overlay.GetOverlayFiles Devuelve una lista de archivos de un volumen almacenado en caché en la superposición de UWF.
UWF_Overlay.SetWarningThreshold Establece el umbral de advertencia para supervisar el tamaño de la superposición de UWF.
UWF_Overlay.SetCriticalThreshold Establece el umbral de advertencia crítico para supervisar el tamaño de la superposición de UWF.

Propiedades

Propiedad Tipo de datos Calificadores Descripción
Identificador string [key] Identificador único. Siempre se establece en UWF_Overlay.
OverlayConsumption UInt32 [read] Tamaño actual, en megabytes, de la superposición UWF.
AvailableSpace UInt32 [read] Cantidad de espacio libre, en megabytes, disponible para la superposición UWF.
CriticalOverlayThreshold UInt32 [read] Tamaño crítico del umbral, en megabytes. UWF envía un evento de notificación de umbral crítico cuando el tamaño de superposición de UWF alcanza o supera este valor.
WarningOverlayThreshold UInt32 [read] Tamaño del umbral de advertencia, en megabytes. UWF envía un evento de notificación de umbral de advertencia cuando el tamaño de superposición de UWF alcanza o supera este valor.

Ejemplos

En el ejemplo siguiente se muestra cómo usar la superposición UWF mediante el proveedor WMI en un script de PowerShell.

$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

Comentarios

Solo existe una instancia de UFW_Overlay para un sistema protegido con UWF.

Requisitos

Edición de Windows Compatible
Windows Home No
Windows Pro No
Windows Enterprise
Windows Education
Windows IoT Enterprise