Share via


UWF_Overlay

Enthält die aktuelle Größe des Overlays des einheitlichen Schreibfilters (UWF, Unified Write Filter) und verwaltet die Schwellenwerte „Kritisch“ und „Warnung“ für die Overlaygröße.

Syntax

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

Member

In den folgenden Tabellen sind alle Methoden und Eigenschaften aufgeführt, die zu dieser Klasse gehören.

Methoden BESCHREIBUNG
UWF_Overlay.GetOverlayFiles Gibt eine Liste der Dateien eines Volumes zurück, die im UWF-Overlay zwischengespeichert wurden.
UWF_Overlay.SetWarningThreshold Legt den Schwellenwert „Warnung“ fest, um die Größe des UWF-Overlays zu überwachen.
UWF_Overlay.SetCriticalThreshold Legt den Schwellenwert „Kritisch“ fest, um die Größe des UWF-Overlays zu überwachen.

Eigenschaften

Eigenschaft Datentyp Qualifizierer BESCHREIBUNG
id Zeichenfolge [key] Eine eindeutige ID. Ist immer auf UWF_Overlay festgelegt.
OverlayConsumption Uint32 [read] Die aktuelle Größe des UWF-Overlays in Megabyte.
AvailableSpace Uint32 [read] Die Menge an freiem Speicherplatz in Megabyte, die für das UWF-Overlay verfügbar ist.
CriticalOverlayThreshold Uint32 [read] Der Schwellenwert für „Kritisch“ in Megabyte. UWF sendet ein Benachrichtigungsereignis, wenn die UWF-Overlaygröße den Schwellenwert für „Kritisch“ erreicht oder überschreitet.
WarningOverlayThreshold Uint32 [read] Der Schwellenwert für „Warnung“ in Megabyte. UWF sendet ein Benachrichtigungsereignis, wenn die UWF-Overlaygröße den Schwellenwert für „Warnung“ erreicht oder überschreitet.

Beispiele

Das folgende Beispiel veranschaulicht, wie Sie das UWF-Overlay mithilfe des WMI-Anbieters in einem PowerShell-Skript verwenden.

$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

Bemerkungen

Für ein mit UWF geschütztes System ist nur eine UWF_Overlay-Instanz vorhanden.

Anforderungen

Windows-Edition Unterstützt
Windows Home Nein
Windows Pro Nein
Windows Enterprise Ja
Windows Education Ja
Windows IoT Enterprise Ja