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
);
};
Члены
В следующих таблицах перечислены все методы и свойства, принадлежащие этому классу.
Методы | Описание |
---|---|
UWF_Overlay.GetOverlayFiles | Возвращает список файлов тома, кэшированных в наложении UWF. |
UWF_Overlay.SetWarningThreshold | Задает пороговое значение предупреждения для мониторинга размера наложения UWF. |
UWF_Overlay.SetCriticalThreshold | Задает пороговое значение критического предупреждения для отслеживания размера наложения UWF. |
Свойства
Свойство | Тип данных | Квалификаторы | Описание |
---|---|---|---|
ID | string | [ключ] | Уникальный идентификатор. Для этого всегда задано значение UWF_Overlay. |
OverlayConsumption | Uint32 | [чтение] | Текущий размер наложения UWF в мегабайтах. |
AvailableSpace | Uint32 | [чтение] | Объем свободного места в мегабайтах, доступный для наложения UWF. |
CriticalOverlayThreshold | Uint32 | [чтение] | Критический пороговый размер в мегабайтах. UWF отправляет критическое пороговое событие уведомления, когда размер наложения UWF достигает или превышает это значение. |
WarningOverlayThreshold | Uint32 | [чтение] | Пороговое значение предупреждения в мегабайтах. UWF отправляет предупреждение пороговое событие уведомления, когда размер наложения UWF достигает или превышает это значение. |
Примеры:
В следующем примере показано, как использовать наложение UWF с помощью поставщика WMI в скрипте 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
Комментарии
Для системы , защищенной UWF, существует только один экземпляр UFW_Overlay.
Требования
Выпуск Windows | Поддерживается |
---|---|
Домашняя страница Windows | Нет |
Windows Pro | Нет |
Windows Корпоративная | Да |
Windows для образовательных учреждений | Да |
Windows IoT Enterprise | Да |